public class InetAddressComparator extends Object implements Comparator<InetAddress>
This comparator will sort InetAddress
instances in the following order:
Inet4Address
instancesInet6Address
instances that are routable with scopeId == 0Inet6Address
instances that are link-local ordered by scopeIdConstructor and Description |
---|
InetAddressComparator() |
Modifier and Type | Method and Description |
---|---|
int |
compare(InetAddress addr1,
InetAddress addr2) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public int compare(InetAddress addr1, InetAddress addr2)
compare
in interface Comparator<InetAddress>
Copyright © 2017. All rights reserved.