Class MultiValuedTimestamp<T extends java.lang.Comparable<T>,​U extends java.lang.Comparable<U>>

  • All Implemented Interfaces:
    java.lang.Comparable<Timestamp>, Timestamp

    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 Detail

      • MultiValuedTimestamp

        public MultiValuedTimestamp​(T value1,
                                    U value2)
        Creates a new timestamp based on two values. The first value has higher precedence than the second when comparing timestamps.
        value1 - first value
        value2 - second value
    • Method Detail

      • compareTo

        public int compareTo​(Timestamp o)
        Specified by:
        compareTo in interface java.lang.Comparable<T extends java.lang.Comparable<T>>
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface Timestamp
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Specified by:
        equals in interface Timestamp
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        toString in class java.lang.Object
      • value1

        public T value1()
        Returns the first value.
        first value
      • value2

        public U value2()
        Returns the second value.
        second value