net.i2p.router.tunnel.pool
Class TunnelPool.LeaseComparator
java.lang.Object
net.i2p.router.tunnel.pool.TunnelPool.LeaseComparator
- All Implemented Interfaces:
- java.util.Comparator
- Enclosing class:
- TunnelPool
class TunnelPool.LeaseComparator
- extends java.lang.Object
- implements java.util.Comparator
Always build a LeaseSet with Leases in sorted order,
so that LeaseSet.equals() and lease-by-lease equals() always work.
The sort method is arbitrary, as far as the equals() tests are concerned,
but we use latest expiration first, since we need to sort them by that anyway.
Method Summary |
int |
compare(java.lang.Object l,
java.lang.Object r)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
equals |
TunnelPool.LeaseComparator
TunnelPool.LeaseComparator()
compare
public int compare(java.lang.Object l,
java.lang.Object r)
- Specified by:
compare
in interface java.util.Comparator