java.lang.Object
net.i2p.router.web.helpers.UDPSorters.PeerComparator
- All Implemented Interfaces:
Serializable, Comparator<PeerState>
- Direct Known Subclasses:
UDPSorters.AlphaComparator, UDPSorters.CwndComparator, UDPSorters.DupComparator, UDPSorters.IdleInComparator, UDPSorters.IdleOutComparator, UDPSorters.MTUComparator, UDPSorters.RateInComparator, UDPSorters.RateOutComparator, UDPSorters.RecvCountComparator, UDPSorters.ResendComparator, UDPSorters.RTOComparator, UDPSorters.RTTComparator, UDPSorters.SendCountComparator, UDPSorters.SkewComparator, UDPSorters.SsthreshComparator, UDPSorters.UptimeComparator
- Enclosing class:
UDPSorters
Base comparator for UDP peers that falls back to peer hash comparison.
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor; the comparison reads the peers and holds no state.Method Summary
All MethodsMethods 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
Constructor Details
PeerComparator
PeerComparator()Default constructor; the comparison reads the peers and holds no state.
Method Details
compare
Orders peers by peer hash, giving the subclass comparisons a tiebreak.- Specified by:
comparein interfaceComparator<PeerState>