## net.i2p.router.tunnel.pool
Class TunnelPool.LeaseComparator

    java.lang.Object
      net.i2p.router.tunnel.pool.TunnelPool.LeaseComparator

All Implemented Interfaces:
  Comparator

Enclosing class:
  TunnelPool

     class TunnelPool.LeaseComparator

extends Object
implements 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.

Constructor Summary
`TunnelPool.LeaseComparator()`

Method Summary
`int` `compare(Object l, 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`

Constructor Detail

### TunnelPool.LeaseComparator

    TunnelPool.LeaseComparator()

Method Detail

### compare

    public int compare(Object l,
                       Object r)

  Specified by:
    `compare` in interface `Comparator`