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 -~

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static HashComparator` | `_instance`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `HashComparator()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and 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

      `comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong`

- - ### Field Detail

    - #### _instance

          public static final HashComparator _instance

  - ### Constructor Detail

    - #### HashComparator

          HashComparator()

  - ### Method Detail

    - #### comp

          public static int comp(Hash l,
                                 Hash r)

    - #### compare

          public int compare(Hash l,
                             Hash r)

      Specified by:
        `compare` in interface `Comparator<Hash>`

    - #### getInstance

          public static HashComparator getInstance()

      Thread safe, no state