Package org.symbol.sdk
Class NetworkTimestamp.Base
java.lang.Object
org.symbol.sdk.NetworkTimestamp.Base
- Direct Known Subclasses:
NetworkTimestamp
- Enclosing class:
NetworkTimestamp
- Base
- Represents a network timestamp. Concrete subclasses must implement
addSeconds(long).
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddHours(long count) Adds a specified number of hours to this timestamp.addMinutes(long count) Adds a specified number of minutes to this timestamp.abstract NetworkTimestamp.BaseaddSeconds(long count) Adds a specified number of seconds to this timestamp.booleaninthashCode()booleanDetermines if this is the epochal timestamp.toString()
-
Field Details
-
timestamp
public final long timestampUnderlying timestamp.
-
-
Constructor Details
-
Base
public Base(long timestamp) Creates a timestamp.- Parameters:
timestamp- Raw network timestamp.
-
-
Method Details
-
isEpochal
public boolean isEpochal()- Base.isEpochal
- Determines if this is the epochal timestamp.
- Returns:
trueif this is the epochal timestamp.
-
addSeconds
- Base.addSeconds
- Adds a specified number of seconds to this timestamp.
- Parameters:
count- Number of seconds to add.- Returns:
- New timestamp that is the specified number of seconds past this timestamp.
-
addMinutes
- Base.addMinutes
- Adds a specified number of minutes to this timestamp.
- Parameters:
count- Number of minutes to add.- Returns:
- New timestamp that is the specified number of minutes past this timestamp.
-
addHours
- Base.addHours
- Adds a specified number of hours to this timestamp.
- Parameters:
count- Number of hours to add.- Returns:
- New timestamp that is the specified number of hours past this timestamp.
-
toString
-
equals
-
hashCode
public int hashCode()
-