Package org.onosproject.store
Interface Timestamp
-
- All Superinterfaces:
java.lang.Comparable<Timestamp>
- All Known Implementing Classes:
LogicalTimestamp,MultiValuedTimestamp,Version,WallClockTimestamp
public interface Timestamp extends java.lang.Comparable<Timestamp>
Opaque version structure.Classes implementing this interface must also implement
hashCode()andequals(Object).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)inthashCode()default booleanisNewerThan(Timestamp other)Tests if this timestamp is newer than the specified timestamp.default booleanisOlderThan(Timestamp other)Tests if this timestamp is older than the specified timestamp.
-
-
-
Method Detail
-
hashCode
int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.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
-
-