Class AbstractFieldComparator
- java.lang.Object
-
- org.apache.lucene.search.FieldComparator
-
- org.apache.jackrabbit.core.query.lucene.FieldComparatorBase
-
- org.apache.jackrabbit.core.query.lucene.sort.AbstractFieldComparator
-
- Direct Known Subclasses:
DynamicOperandFieldComparator
public abstract class AbstractFieldComparator extends FieldComparatorBase
Abstract base class forFieldComparator
s which keep their values (Comparable
s) in an array.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.lucene.search.FieldComparator
org.apache.lucene.search.FieldComparator.ByteComparator, org.apache.lucene.search.FieldComparator.DocComparator, org.apache.lucene.search.FieldComparator.DoubleComparator, org.apache.lucene.search.FieldComparator.FloatComparator, org.apache.lucene.search.FieldComparator.IntComparator, org.apache.lucene.search.FieldComparator.LongComparator, org.apache.lucene.search.FieldComparator.NumericComparator<T extends Number>, org.apache.lucene.search.FieldComparator.RelevanceComparator, org.apache.lucene.search.FieldComparator.ShortComparator, org.apache.lucene.search.FieldComparator.StringComparatorLocale, org.apache.lucene.search.FieldComparator.StringOrdValComparator, org.apache.lucene.search.FieldComparator.StringValComparator
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractFieldComparator(int numHits)
Create a new instance with the given number of values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
getUUIDForIndex(int doc)
Comparable<?>
getValue(int slot)
Return a value from the values arrayprotected int
readerIndex(int n)
Returns the reader index for documentn
.void
setNextReader(org.apache.lucene.index.IndexReader reader, int docBase)
void
setValue(int slot, Comparable<?> value)
Add the given value to the values array-
Methods inherited from class org.apache.jackrabbit.core.query.lucene.FieldComparatorBase
compare, compare, compareBottom, copy, setBottom, sortValue, value
-
-
-
-
Method Detail
-
readerIndex
protected final int readerIndex(int n)
Returns the reader index for documentn
.- Parameters:
n
- document number.- Returns:
- the reader index.
-
setValue
public void setValue(int slot, Comparable<?> value)
Add the given value to the values array- Specified by:
setValue
in classFieldComparatorBase
- Parameters:
slot
- index into valuesvalue
- value for adding
-
getValue
public Comparable<?> getValue(int slot)
Return a value from the values array- Specified by:
getValue
in classFieldComparatorBase
- Parameters:
slot
- index to retrieve- Returns:
- the retrieved value
-
setNextReader
public void setNextReader(org.apache.lucene.index.IndexReader reader, int docBase) throws IOException
- Specified by:
setNextReader
in classorg.apache.lucene.search.FieldComparator
- Throws:
IOException
-
getUUIDForIndex
protected String getUUIDForIndex(int doc) throws IOException
- Throws:
IOException
-
-