java.lang.Object
i2p.susi.dns.AddressByDateSorter
All Implemented Interfaces:
Serializable, Comparator<AddressBean>

public class AddressByDateSorterextends Object implements Comparator<AddressBean>, Serializable
Comparator for sorting AddressBean by date (newest first, then alphabetical).
See Also:
  • Constructor Details

    • AddressByDateSorter

      public AddressByDateSorter()
      Creates a date-order comparator.
  • Method Details

    • compare

      public int compare(AddressBean a, AddressBean b)
      Compare two AddressBeans by added date, newest first, then alphabetically by display name.
      Specified by:
      compare in interface Comparator<AddressBean>
      Parameters:
      a - the first AddressBean
      b - the second AddressBean
      Returns:
      negative if a is newer, positive if older, 0 if equal