public interface IndexedSortable
| Modifier and Type | Method and Description |
|---|---|
int |
compare(int i,
int j)
Compare items at the given addresses consistent with the semantics of
Comparator.compare(Object, Object). |
int |
compare(int segmentNumberI,
int segmentOffsetI,
int segmentNumberJ,
int segmentOffsetJ)
Compare records at the given addresses consistent with the semantics of
Comparator.compare(Object, Object). |
int |
recordSize()
Gets the size of each record, the number of bytes separating the head of successive records.
|
int |
recordsPerSegment()
Gets the number of elements in each memory segment.
|
int |
size()
Gets the number of elements in the sortable.
|
void |
swap(int i,
int j)
Swap items at the given addresses.
|
void |
swap(int segmentNumberI,
int segmentOffsetI,
int segmentNumberJ,
int segmentOffsetJ)
Swap records at the given addresses.
|
int compare(int i,
int j)
Comparator.compare(Object, Object).int compare(int segmentNumberI,
int segmentOffsetI,
int segmentNumberJ,
int segmentOffsetJ)
Comparator.compare(Object, Object).segmentNumberI - index of memory segment containing first recordsegmentOffsetI - offset into memory segment containing first recordsegmentNumberJ - index of memory segment containing second recordsegmentOffsetJ - offset into memory segment containing second recordvoid swap(int i,
int j)
void swap(int segmentNumberI,
int segmentOffsetI,
int segmentNumberJ,
int segmentOffsetJ)
segmentNumberI - index of memory segment containing first recordsegmentOffsetI - offset into memory segment containing first recordsegmentNumberJ - index of memory segment containing second recordsegmentOffsetJ - offset into memory segment containing second recordint size()
int recordSize()
int recordsPerSegment()
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.