java.lang.Object
net.i2p.router.transport.udp.EstablishmentManager.TokenComparator
- All Implemented Interfaces:
Serializable, Comparator<Map.Entry<RemoteHostId, EstablishmentManager.Token>>
- Enclosing class:
EstablishmentManager
private static class EstablishmentManager.TokenComparatorextends Object implements Comparator<Map.Entry<RemoteHostId, EstablishmentManager.Token>>, Serializable
Soonest expiration first.
Constructor Summary
ConstructorsMethod Summary
All MethodsModifier and TypeMethodDescriptionintcompare(Map.Entry<RemoteHostId, EstablishmentManager.Token> l, Map.Entry<RemoteHostId, EstablishmentManager.Token> r) Compare the two entries by expiration, soonest first.Methods 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
TokenComparator
private TokenComparator()Orders hosts by how many tokens they hold.
Method Details
compare
public int compare(Map.Entry<RemoteHostId, EstablishmentManager.Token> l, Map.Entry<RemoteHostId, EstablishmentManager.Token> r) Compare the two entries by expiration, soonest first.- Specified by:
comparein interfaceComparator<Map.Entry<RemoteHostId, EstablishmentManager.Token>>