|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lucene.util.Sorter
public abstract class Sorter
Base class for sorting algorithms implementations.
Constructor Summary | |
---|---|
protected |
Sorter()
Sole constructor, used for inheritance. |
Method Summary | |
---|---|
protected abstract int |
compare(int i,
int j)
Compare entries found in slots i and j . |
abstract void |
sort(int from,
int to)
Sort the slice which starts at from (inclusive) and ends at
to (exclusive). |
protected abstract void |
swap(int i,
int j)
Swap values at slots i and j . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Sorter()
Method Detail |
---|
protected abstract int compare(int i, int j)
i
and j
.
The contract for the returned value is the same as
Comparator.compare(Object, Object)
.
protected abstract void swap(int i, int j)
i
and j
.
public abstract void sort(int from, int to)
from
(inclusive) and ends at
to
(exclusive).
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |