mirror of https://github.com/apache/lucene.git
Typo.
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1330205 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0f08c5a3f9
commit
7f123ea6f6
|
@ -125,40 +125,40 @@ public final class BytesRefList {
|
||||||
}
|
}
|
||||||
|
|
||||||
private int[] sort(final Comparator<BytesRef> comp) {
|
private int[] sort(final Comparator<BytesRef> comp) {
|
||||||
final int[] orderdEntries = new int[size()];
|
final int[] orderedEntries = new int[size()];
|
||||||
for (int i = 0; i < orderdEntries.length; i++) {
|
for (int i = 0; i < orderedEntries.length; i++) {
|
||||||
orderdEntries[i] = i;
|
orderedEntries[i] = i;
|
||||||
}
|
}
|
||||||
new SorterTemplate() {
|
new SorterTemplate() {
|
||||||
@Override
|
@Override
|
||||||
protected void swap(int i, int j) {
|
protected void swap(int i, int j) {
|
||||||
final int o = orderdEntries[i];
|
final int o = orderedEntries[i];
|
||||||
orderdEntries[i] = orderdEntries[j];
|
orderedEntries[i] = orderedEntries[j];
|
||||||
orderdEntries[j] = o;
|
orderedEntries[j] = o;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int compare(int i, int j) {
|
protected int compare(int i, int j) {
|
||||||
final int ord1 = orderdEntries[i], ord2 = orderdEntries[j];
|
final int ord1 = orderedEntries[i], ord2 = orderedEntries[j];
|
||||||
return comp.compare(get(scratch1, ord1), get(scratch2, ord2));
|
return comp.compare(get(scratch1, ord1), get(scratch2, ord2));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void setPivot(int i) {
|
protected void setPivot(int i) {
|
||||||
final int ord = orderdEntries[i];
|
final int ord = orderedEntries[i];
|
||||||
get(pivot, ord);
|
get(pivot, ord);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int comparePivot(int j) {
|
protected int comparePivot(int j) {
|
||||||
final int ord = orderdEntries[j];
|
final int ord = orderedEntries[j];
|
||||||
return comp.compare(pivot, get(scratch2, ord));
|
return comp.compare(pivot, get(scratch2, ord));
|
||||||
}
|
}
|
||||||
|
|
||||||
private final BytesRef pivot = new BytesRef(), scratch1 = new BytesRef(),
|
private final BytesRef pivot = new BytesRef(), scratch1 = new BytesRef(),
|
||||||
scratch2 = new BytesRef();
|
scratch2 = new BytesRef();
|
||||||
}.quickSort(0, size() - 1);
|
}.quickSort(0, size() - 1);
|
||||||
return orderdEntries;
|
return orderedEntries;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue