Package org.apache.hadoop.util
Interface IndexedSortable
@LimitedPrivate("MapReduce")
@Unstable
public interface IndexedSortable
Interface for collections capable of being sorted by
IndexedSorter
algorithms.-
Method Summary
Modifier and TypeMethodDescriptionintcompare(int i, int j) Compare items at the given addresses consistent with the semantics ofComparator.compare(Object, Object).voidswap(int i, int j) Swap items at the given addresses.
-
Method Details
-
compare
int compare(int i, int j) Compare items at the given addresses consistent with the semantics ofComparator.compare(Object, Object).- Parameters:
i- (int).j- (int).- Returns:
- compare result.
-
swap
void swap(int i, int j) Swap items at the given addresses.- Parameters:
i- i(int).j- j(int).
-