Package net.i2p.router.web.helpers
Class HashComparator
- java.lang.Object
-
- net.i2p.router.web.helpers.HashComparator
-
- All Implemented Interfaces:
Serializable
,Comparator<Hash>
class HashComparator extends Object implements Comparator<Hash>, Serializable
Sorts in true binary order, not Base64 string order. A-Z a-z 0-9 -~- Since:
- 0.9.64 moved from BanlistRenderer
-
-
Field Summary
Fields Modifier and Type Field Description static HashComparator
_instance
-
Constructor Summary
Constructors Constructor Description HashComparator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static int
comp(Hash l, Hash r)
int
compare(Hash l, Hash r)
static HashComparator
getInstance()
Thread safe, no state-
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, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Field Detail
-
_instance
public static final HashComparator _instance
-
-
Method Detail
-
getInstance
public static HashComparator getInstance()
Thread safe, no state
-
compare
public int compare(Hash l, Hash r)
- Specified by:
compare
in interfaceComparator<Hash>
-
-