java.lang.Object
i2p.susi.webmail.Sorters.SorterBase
i2p.susi.webmail.Sorters.DateSorter
All Implemented Interfaces:
Serializable, Comparator<String>
Enclosing class:
Sorters

public static class Sorters.DateSorterextends Sorters.SorterBase
Sorts Mail objects by date field.
See Also:
  • Constructor Details

    • DateSorter

      public DateSorter(MailCache mailCache)
      Sorts by date field.
      Parameters:
      mailCache - the mail cache
  • Method Details

    • compare

      protected int compare(Mail a, Mail b)
      Compare two objects.
      Specified by:
      compare in class Sorters.SorterBase
      Parameters:
      a - the mail on the left of the comparison
      b - the mail on the right of the comparison
      Returns:
      negative, zero or positive as the left mail sorts before or after the right
    • scompare

      public static int scompare(Mail a, Mail b)
      Use as fallback in other sorters.
      Parameters:
      a - non-null
      b - non-null
      Returns:
      negative, zero or positive as the first mail sorts before, at the same date as, or after the second; a mail with no date sorts last