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 boolean
equals(java.lang.Object obj)
int
hashCode()
default boolean
isNewerThan(Timestamp other)
Tests if this timestamp is newer than the specified timestamp.default boolean
isOlderThan(Timestamp other)
Tests if this timestamp is older than the specified timestamp.
-
-
-
Method Detail
-
hashCode
int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
boolean equals(java.lang.Object obj)
- Overrides:
equals
in 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
-
-