net.i2p.router.web.helpers

## Class RouterInfoComparator

- java.lang.Object
- - net.i2p.router.web.helpers.RouterInfoComparator

- All Implemented Interfaces:
    Serializable, Comparator<RouterInfo>

      class RouterInfoComparator
      extends Object
      implements Comparator<RouterInfo>, 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 RouterInfoComparator` | `_instance`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RouterInfoComparator()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static int` | `comp(RouterInfo l, RouterInfo r)`
    `int` | `compare(RouterInfo l, RouterInfo r)`
    `static RouterInfoComparator` | `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 RouterInfoComparator _instance

  - ### Constructor Detail

    - #### RouterInfoComparator

          RouterInfoComparator()

  - ### Method Detail

    - #### comp

          public static int comp(RouterInfo l,
                                 RouterInfo r)

      Parameters:
        `l` - non-null
        `r` - non-null

    - #### compare

          public int compare(RouterInfo l,
                             RouterInfo r)

      Specified by:
        `compare` in interface `Comparator<RouterInfo>`
      Parameters:
        `l` - non-null
        `r` - non-null

    - #### getInstance

          public static RouterInfoComparator getInstance()

      Thread safe, no state