Class NetworkTimestamp.Base

java.lang.Object
org.symbol.sdk.NetworkTimestamp.Base
Direct Known Subclasses:

NetworkTimestamp

Enclosing class:

NetworkTimestamp


public abstract static class NetworkTimestamp.Base extends Object
Base

Represents a network timestamp. Concrete subclasses must implement addSeconds(long).

  • Field Details

    • timestamp

      public final long timestamp
      Underlying 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:

      true if this is the epochal timestamp.

    • addSeconds

      public abstract NetworkTimestamp.Base addSeconds(long count)
      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

      public NetworkTimestamp.Base addMinutes(long count)
      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

      public NetworkTimestamp.Base addHours(long count)
      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

      public String toString()
      Overrides:

      toString in class Object

    • equals

      public boolean equals(Object other)
      Overrides:

      equals in class Object

    • hashCode

      public int hashCode()
      Overrides:

      hashCode in class Object