Package org.onosproject.store.service
Class MultiValuedTimestamp<T extends Comparable<T>,U extends Comparable<U>>
- java.lang.Object
-
- org.onosproject.store.service.MultiValuedTimestamp<T,U>
-
- All Implemented Interfaces:
Comparable<Timestamp>
,Timestamp
public class MultiValuedTimestamp<T extends Comparable<T>,U extends Comparable<U>> extends Object implements Timestamp
A logical timestamp that derives its value from two input values. The first value always takes precedence over the second value when comparing timestamps.
-
-
Constructor Summary
Constructors Constructor Description MultiValuedTimestamp(T value1, U value2)
Creates a new timestamp based on two values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(Timestamp o)
boolean
equals(Object obj)
int
hashCode()
String
toString()
T
value1()
Returns the first value.U
value2()
Returns the second value.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.onosproject.store.Timestamp
isNewerThan, isOlderThan
-
-
-
-
Method Detail
-
compareTo
public int compareTo(Timestamp o)
- Specified by:
compareTo
in interfaceComparable<T extends Comparable<T>>
-
hashCode
public int hashCode()
-
equals
public boolean equals(Object obj)
-
value1
public T value1()
Returns the first value.- Returns:
- first value
-
value2
public U value2()
Returns the second value.- Returns:
- second value
-
-