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

public static class Sorters.SubjectSorterextends Sorters.SorterBase
Sorts Mail objects by subject field.
See Also:
  • Field Details

    • xre

      private static final String xre
      Lower-cased "Re:" prefix, stripped when sorting by subject
    • xfwd

      private static final String xfwd
      Lower-cased "Fwd:" prefix, stripped when sorting by subject
    • collator

      private final Comparator<Object> collator
      Locale-aware string collator.
  • Constructor Details

    • SubjectSorter

      public SubjectSorter(MailCache mailCache)
      Sorts by subject 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