All Implemented Interfaces:
Serializable, Comparator<String>
Enclosing class:
Sorters

public static class Sorters.ToSorterextends Sorters.SorterBase
Sorts Mail objects by recipient fields.
See Also:
  • Field Details

    • collator

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

    • ToSorter

      public ToSorter(MailCache mailCache)
      Sorts by recipient 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