Package org.onosproject.store.service
Class MultiValuedTimestamp<T extends java.lang.Comparable<T>,U extends java.lang.Comparable<U>>
- java.lang.Object
-
- org.onosproject.store.service.MultiValuedTimestamp<T,U>
-
public class MultiValuedTimestamp<T extends java.lang.Comparable<T>,U extends java.lang.Comparable<U>> extends java.lang.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(java.lang.Object obj)
int
hashCode()
java.lang.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)
-
hashCode
public int hashCode()
-
equals
public boolean equals(java.lang.Object obj)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
value1
public T value1()
Returns the first value.- Returns:
- first value
-
value2
public U value2()
Returns the second value.- Returns:
- second value
-
-