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 class
CountComparator 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 class
ValueComparator is similar to the default comparator CountComparator in the way they treat addresses representing a single address. -
Method Summary
Modifier and TypeMethodDescriptionint
int
compare
(AddressSection one, AddressSection two) int
compare
(AddressSegment one, AddressSegment two) int
int
int
compare
(AddressItem one, AddressItem two) int
compare
(IPAddressSeqRange one, IPAddressSeqRange two) Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Method Details
-
compare
-
compare
-
compare
- Specified by:
compare
in interfaceComparator<AddressItem>
-
compare
-
compare
-
compare
-
compare
-