Package org.apache.lucene.util.fst
Class BytesRefFSTEnum<T>
java.lang.Object
org.apache.lucene.util.fst.FSTEnum<T>
org.apache.lucene.util.fst.BytesRefFSTEnum<T>
Enumerates all input (BytesRef) + output pairs in an FST.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Holds a single input (BytesRef) + output pair. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BytesRef
private final BytesRefFSTEnum.InputOutput<T>
private BytesRef
-
Constructor Summary
ConstructorsConstructorDescriptionBytesRefFSTEnum
(FST<T> fst) doFloor controls the behavior of advance: if it's true doFloor is true, advance positions to the biggest term before target. -
Method Summary
Modifier and TypeMethodDescriptioncurrent()
protected int
protected int
protected void
grow()
next()
Seeks to smallest term that's >= target.Seeks to exactly this term, returning null if the term doesn't exist.Seeks to biggest term that's <= target.protected void
setCurrentLabel
(int label) private BytesRefFSTEnum.InputOutput<T>
Methods inherited from class org.apache.lucene.util.fst.FSTEnum
doNext, doSeekCeil, doSeekExact, doSeekFloor
-
Field Details
-
current
-
result
-
target
-
-
Constructor Details
-
BytesRefFSTEnum
doFloor controls the behavior of advance: if it's true doFloor is true, advance positions to the biggest term before target.
-
-
Method Details
-
current
-
next
- Throws:
IOException
-
seekCeil
Seeks to smallest term that's >= target.- Throws:
IOException
-
seekFloor
Seeks to biggest term that's <= target.- Throws:
IOException
-
seekExact
Seeks to exactly this term, returning null if the term doesn't exist. This is faster than usingseekFloor(org.apache.lucene.util.BytesRef)
orseekCeil(org.apache.lucene.util.BytesRef)
because it short-circuits as soon the match is not found.- Throws:
IOException
-
getTargetLabel
protected int getTargetLabel()- Specified by:
getTargetLabel
in classFSTEnum<T>
-
getCurrentLabel
protected int getCurrentLabel()- Specified by:
getCurrentLabel
in classFSTEnum<T>
-
setCurrentLabel
protected void setCurrentLabel(int label) - Specified by:
setCurrentLabel
in classFSTEnum<T>
-
grow
protected void grow() -
setResult
-