Class DescTimeComparator

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getCurrentEndTime​(long time1, long time2)  
      boolean satisfyCurEndTime​(long time, long endTime)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DescTimeComparator

        public DescTimeComparator()
    • Method Detail

      • satisfyCurEndTime

        public boolean satisfyCurEndTime​(long time,
                                         long endTime)
        Specified by:
        satisfyCurEndTime in interface TimeComparator
        Returns:
        if order by time desc, return true if time >= endTime, otherwise false
      • getCurrentEndTime

        public long getCurrentEndTime​(long time1,
                                      long time2)
        Specified by:
        getCurrentEndTime in interface TimeComparator
        Returns:
        min(time1, time2) if order by time asc, max(time1, time2) if order by desc