Package org.apache.lucene.util.fst
Class Outputs<T>
- java.lang.Object
-
- org.apache.lucene.util.fst.Outputs<T>
-
- Direct Known Subclasses:
ByteSequenceOutputs,IntSequenceOutputs,NoOutputs,PairOutputs,PositiveIntOutputs,UpToTwoPositiveIntOutputs
public abstract class Outputs<T> extends Object
Represents the outputs for an FST, providing the basic algebra required for building and traversing the FST.Note that any operation that returns NO_OUTPUT must return the same singleton object from
getNoOutput().- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Constructor Summary
Constructors Constructor Description Outputs()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Tadd(T prefix, T output)Eg add("foo", "bar") -> "foobar"abstract Tcommon(T output1, T output2)Eg common("foo", "foobar") -> "foo"abstract TgetNoOutput()NOTE: this output is compared with == so you must ensure that all methods return the single object if it's really no outputTmerge(T first, T second)abstract StringoutputToString(T output)abstract Tread(DataInput in)abstract Tsubtract(T output, T inc)Eg subtract("foobar", "foo") -> "bar"abstract voidwrite(T output, DataOutput out)
-
-
-
Method Detail
-
write
public abstract void write(T output, DataOutput out) throws IOException
- Throws:
IOException
-
read
public abstract T read(DataInput in) throws IOException
- Throws:
IOException
-
getNoOutput
public abstract T getNoOutput()
NOTE: this output is compared with == so you must ensure that all methods return the single object if it's really no output
-
-