public class InetSocketAddressComparator extends Object implements Comparator<InetSocketAddress>, Serializable
java.net.InetSocketAddress instances
based on the address bytes and the TCP port. Uses
net.sf.eBus.net.InetAddressComparator to compare
the socket addresses.| Constructor and Description |
|---|
InetSocketAddressComparator()
Creates a new instance of InetSocketAddressComparator.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compare(InetSocketAddress a1,
InetSocketAddress a2)
Returns an integer <, equal to or > zero if
a1 is <, equal to or > a2. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcomparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongpublic InetSocketAddressComparator()
public int compare(InetSocketAddress a1, InetSocketAddress a2)
a1 is <, equal to or > a2.
The InetAddresses are compared first. If equal,
the ports are compared.compare in interface Comparator<InetSocketAddress>a1 - First compared address.a2 - Second compared address.a1 is <, equal to or > a2.InetAddressComparatorCopyright © 2019. All rights reserved.