net.i2p.router.web.helpers

## Class UDPSorters.RTTComparator

- java.lang.Object
- - net.i2p.router.web.helpers.UDPSorters.PeerComparator
  - - net.i2p.router.web.helpers.UDPSorters.RTTComparator

- All Implemented Interfaces:
    Serializable, Comparator<PeerState>
  Enclosing class:
    UDPSorters

      static class UDPSorters.RTTComparator
      extends UDPSorters.PeerComparator

  Comparator for sorting UDP peers by round trip time in ascending order.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RTTComparator()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compare(PeerState l, PeerState 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

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

- - ### Constructor Detail

    - #### RTTComparator

          RTTComparator()

  - ### Method Detail

    - #### compare

          public int compare(PeerState l,
                             PeerState r)

      Specified by:
        `compare` in interface `Comparator<PeerState>`
      Overrides:
        `compare` in class `UDPSorters.PeerComparator`