org.opennms.core.utils
Class InetAddressComparator
java.lang.Object
org.opennms.core.utils.InetAddressComparator
- All Implemented Interfaces:
- Comparator<InetAddress>
public class InetAddressComparator
- extends Object
- implements Comparator<InetAddress>
This comparator will sort InetAddress instances in the following order:
Inet4Address instances
Inet6Address instances that are routable with scopeId == 0
Inet6Address instances that are link-local ordered by scopeId
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InetAddressComparator
public InetAddressComparator()
compare
public int compare(InetAddress addr1,
InetAddress addr2)
- Specified by:
compare in interface Comparator<InetAddress>
Copyright © 2011. All Rights Reserved.