Package org.apache.lucene.util

## Class StringSorter.MSBStringRadixSorter

- java.lang.Object
- - org.apache.lucene.util.Sorter
  - - org.apache.lucene.util.MSBRadixSorter
    - - org.apache.lucene.util.StringSorter.MSBStringRadixSorter

- Enclosing class:
    StringSorter

      protected class StringSorter.MSBStringRadixSorter
      extends MSBRadixSorter

  A radix sorter for `BytesRef`

- - ### Field Summary

    - ### Fields inherited from class org.apache.lucene.util.MSBRadixSorter

      `HISTOGRAM_SIZE, LENGTH_THRESHOLD, LEVEL_THRESHOLD, maxLength`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor | Description
    --- | --- | ---
    `protected` | `MSBStringRadixSorter​(BytesRefComparator cmp)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected int` | `byteAt​(int i, int k)` | Return the k-th byte of the entry at index `i`, or `-1` if its length is less than or equal to `k`.
    `protected Sorter` | `getFallbackSorter​(int k)` | Get a fall-back sorter which may assume that the first k bytes of all compared strings are equal.
    `protected void` | `swap​(int i, int j)` | Swap values at slots `i` and `j`.

    - ### Methods inherited from class org.apache.lucene.util.MSBRadixSorter

      `buildHistogram, compare, getBucket, reorder, shouldFallback, sort, sort`

    - ### Methods inherited from class org.apache.lucene.util.Sorter

      `comparePivot, setPivot`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MSBStringRadixSorter

          protected MSBStringRadixSorter​(BytesRefComparator cmp)

  - ### Method Detail

    - #### swap

          protected void swap​(int i,
                              int j)

      Description copied from class: `Sorter`
      Swap values at slots `i` and `j`.
      Specified by:
        `swap` in class `Sorter`

    - #### byteAt

          protected int byteAt​(int i,
                               int k)

      Description copied from class: `MSBRadixSorter`
      Return the k-th byte of the entry at index `i`, or `-1` if its length is less than or equal to `k`. This may only be called with a value of `i` between `0` included and `maxLength` excluded.
      Specified by:
        `byteAt` in class `MSBRadixSorter`

    - #### getFallbackSorter

          protected Sorter getFallbackSorter​(int k)

      Description copied from class: `MSBRadixSorter`
      Get a fall-back sorter which may assume that the first k bytes of all compared strings are equal.
      Overrides:
        `getFallbackSorter` in class `MSBRadixSorter`