Package org.quartz

Class Trigger.TriggerTimeComparator

  • All Implemented Interfaces:
    java.io.Serializable, java.util.Comparator<Trigger>
    Enclosing interface:
    Trigger

    public static class Trigger.TriggerTimeComparator
    extends java.lang.Object
    implements java.util.Comparator<Trigger>, java.io.Serializable
    A Comparator that compares trigger's next fire times, or in other words, sorts them according to earliest next fire time. If the fire times are the same, then the triggers are sorted according to priority (highest value first), if the priorities are the same, then they are sorted by key.
    See Also:
    Serialized Form
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static int compare​(java.util.Date nextFireTime1, int priority1, TriggerKey key1, java.util.Date nextFireTime2, int priority2, TriggerKey key2)  
      int compare​(Trigger t1, Trigger t2)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Comparator

        equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
    • Constructor Detail

      • TriggerTimeComparator

        public TriggerTimeComparator()
    • Method Detail

      • compare

        public static int compare​(java.util.Date nextFireTime1,
                                  int priority1,
                                  TriggerKey key1,
                                  java.util.Date nextFireTime2,
                                  int priority2,
                                  TriggerKey key2)
      • compare

        public int compare​(Trigger t1,
                           Trigger t2)
        Specified by:
        compare in interface java.util.Comparator<Trigger>