Class AddressComparator
java.lang.Object
inet.ipaddr.AddressComparator
- All Implemented Interfaces:
Comparator<AddressItem>
- Direct Known Subclasses:
AddressComparator.CountComparator, AddressComparator.ValueComparator
- Author:
- sfoley
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classCountComparator first compares two address items by count, first by bit count for dissimilar items,AddressItem.getBitCount(), then by count of values for similar items, (AddressItem.getCount()) and if both match, defers to the address item values for comparison.static classValueComparator is similar to the default comparator CountComparator in the way they treat addresses representing a single address. -
Method Summary
Modifier and TypeMethodDescriptionintintcompare(AddressSection one, AddressSection two) intcompare(AddressSegment one, AddressSegment two) intintintcompare(AddressItem one, AddressItem two) intcompare(IPAddressSeqRange one, IPAddressSeqRange two) Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Method Details
-
compare
-
compare
-
compare
- Specified by:
comparein interfaceComparator<AddressItem>
-
compare
-
compare
-
compare
-
compare
-