IndexedSorter (Apache Hadoop Common 3.5.0 API)
Description: declaration: package: org.apache.hadoop.util, interface: IndexedSorter

Package org.apache.hadoop.util

# Interface IndexedSorter

All Known Implementing Classes:
  `HeapSort`, `QuickSort`

@LimitedPrivate("MapReduce") @Unstable public interface IndexedSorter
Interface for sort algorithms accepting `IndexedSortable` items. A sort algorithm implementing this interface may only `IndexedSortable.compare(int, int)` and `IndexedSortable.swap(int, int)` items for a range of indices to effect a sort across that range.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `sort(IndexedSortable s, int l, int r)`
  Sort the items accessed through the given IndexedSortable over the given range of logical indices.
  `void`
  `sort(IndexedSortable s, int l, int r, Progressable rep)`
  Same as `sort(IndexedSortable,int,int)`, but indicate progress periodically.

- ## Method Details

  - ### sort

    void sort(IndexedSortable s, int l, int r)
    Sort the items accessed through the given IndexedSortable over the given range of logical indices. From the perspective of the sort algorithm, each index between l (inclusive) and r (exclusive) is an addressable entry.
    Parameters:
      `r` - r.
      `l` - l.
      `s` - s.
    See Also:
      - `IndexedSortable.compare(int, int)`
      - `IndexedSortable.swap(int, int)`

  - ### sort

    void sort(IndexedSortable s, int l, int r, Progressable rep)
    Same as `sort(IndexedSortable,int,int)`, but indicate progress periodically.
    Parameters:
      `s` - s.
      `l` - l.
      `r` - r.
      `rep` - rep.
    See Also:
      - `sort(IndexedSortable,int,int)`