Class TimeStampedPair<K extends TimeStamped,​V extends TimeStamped>

  • Type Parameters:
    K - first time stamped value
    V - second time stamped value
    All Implemented Interfaces:
    TimeStamped

    public class TimeStampedPair<K extends TimeStamped,​V extends TimeStamped>
    extends Object
    implements TimeStamped
    Pair of time stamped values being defined at the same date.
    Author:
    Vincent Cucchietti
    See Also:
    TimeStamped
    • Field Detail

      • DEFAULT_DATE_EQUALITY_THRESHOLD

        public static final double DEFAULT_DATE_EQUALITY_THRESHOLD
        Default date equality threshold of 1 ns.
        See Also:
        Constant Field Values
    • Constructor Detail

      • TimeStampedPair

        public TimeStampedPair​(K first,
                               V second)
        Constructor.

        First and second value must have the same date.

        Parameters:
        first - first time stamped value
        second - second time stamped value
      • TimeStampedPair

        public TimeStampedPair​(K first,
                               V second,
                               double dateEqualityThreshold)
        Constructor.

        First and second value must have the same date.

        Parameters:
        first - first time stamped value
        second - second time stamped value
        dateEqualityThreshold - threshold below which dates are considered equal
    • Method Detail

      • checkDatesConsistency

        public static void checkDatesConsistency​(AbsoluteDate firstDate,
                                                 AbsoluteDate secondDate,
                                                 double dateEqualityThreshold)
        Check date consistency.
        Parameters:
        firstDate - first date
        secondDate - second date
        dateEqualityThreshold - threshold below which dates are considered equal
      • getFirst

        public K getFirst()
        Get first time stamped value.
        Returns:
        first time stamped value
      • getSecond

        public V getSecond()
        Get second time stamped value.
        Returns:
        second time stamped value