java.lang.Object
net.i2p.router.web.helpers.PeerHelper.PeerComparator
net.i2p.router.web.helpers.PeerHelper.AlphaComparator
- All Implemented Interfaces:
Serializable, Comparator<NTCPConnection>
- Enclosing class:
PeerHelper
Sorts peers alphabetically.
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final PeerHelper.AlphaComparatorThe shared alphabetical comparator.Constructor Summary
ConstructorsMethod Summary
All MethodsModifier and TypeMethodDescriptionstatic final PeerHelper.AlphaComparatorinstance()Returns the shared comparator, ordering connections by remote peer hash.Methods inherited from class PeerHelper.PeerComparator
compareMethods inherited from class Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Comparator
equals, max, min, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
Field Details
_instance
The shared alphabetical comparator.
Constructor Details
AlphaComparator
private AlphaComparator()Created once, as the shared instance below.
Method Details
instance
Returns the shared comparator, ordering connections by remote peer hash.- Returns:
- the shared instance