java.lang.Object
net.i2p.router.web.helpers.SybilRenderer.FooComparator<K>
Type Parameters:
K - the key type compared
All Implemented Interfaces:
Serializable, Comparator<K>
Enclosing class:
SybilRenderer

private static class SybilRenderer.FooComparator<K extends Comparable>extends Object implements Comparator<K>, Serializable
Orders keys by how many routers share each.
  • Field Details

  • Constructor Details

    • FooComparator

      public FooComparator(Map<K, List<RouterInfo>> o)
      Orders keys by how many routers share each, most first.
      Parameters:
      o - the routers, by key, to compare by
  • Method Details

    • compare

      public int compare(K l, K r)
      Orders two keys by shared-router count, then naturally.
      Specified by:
      compare in interface Comparator<K extends Comparable>