Interface Timestamp

All Superinterfaces:
Comparable<Timestamp>
All Known Implementing Classes:
LogicalTimestamp, Version, WallClockTimestamp

public interface Timestamp extends Comparable<Timestamp>
Opaque version structure.

Classes implementing this interface must also implement hashCode() and equals(Object).

  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    int
     
    default boolean
    Tests if this timestamp is newer than the specified timestamp.
    default boolean
    Tests if this timestamp is older than the specified timestamp.

    Methods inherited from interface java.lang.Comparable

    compareTo
  • Method Details

    • hashCode

      int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      boolean equals(Object obj)
      Overrides:
      equals in class Object
    • isNewerThan

      default boolean isNewerThan(Timestamp other)
      Tests if this timestamp is newer than the specified timestamp.
      Parameters:
      other - timestamp to compare against
      Returns:
      true if this instance is newer
    • isOlderThan

      default boolean isOlderThan(Timestamp other)
      Tests if this timestamp is older than the specified timestamp.
      Parameters:
      other - timestamp to compare against
      Returns:
      true if this instance is older