Class TimeseriesPointComparator<P extends TimeseriesPoint>

    • Constructor Detail

      • TimeseriesPointComparator

        public TimeseriesPointComparator()
        The default constructor uses comparison by timestamp in ascending manner.
      • TimeseriesPointComparator

        public TimeseriesPointComparator​(boolean ascending)
        This constructor initializes the comparator either in ascending manner or descending.
        Parameters:
        ascending - if true then the ordering is done in ascending manner, otherwise descending
    • Method Detail

      • compare

        public int compare​(TimeseriesPoint o1,
                           TimeseriesPoint o2)
        Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
        Specified by:
        compare in interface Comparator<P extends TimeseriesPoint>
        Specified by:
        compare in class DataPointComparator<P extends TimeseriesPoint>
        Parameters:
        o1 - the first object
        o2 - the second object
        Returns:
        a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.