java.lang.Object
i2p.susi.dns.AddressByDateSorter
- All Implemented Interfaces:
Serializable, Comparator<AddressBean>
Comparator for sorting AddressBean by date (newest first, then alphabetical).
- See Also:
Constructor Summary
ConstructorsMethod Summary
All MethodsModifier and TypeMethodDescriptionintcompare(AddressBean a, AddressBean b) Compare two AddressBeans by added date, newest first, then alphabetically by display name.Methods inherited from class Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Comparator
equals, max, min, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
Constructor Details
AddressByDateSorter
public AddressByDateSorter()Creates a date-order comparator.
Method Details
compare
Compare two AddressBeans by added date, newest first, then alphabetically by display name.- Specified by:
comparein interfaceComparator<AddressBean>- Parameters:
a- the first AddressBeanb- the second AddressBean- Returns:
- negative if a is newer, positive if older, 0 if equal