Package org.apache.lucene.util.fst
Class ByteSequenceOutputs
- java.lang.Object
-
- org.apache.lucene.util.fst.Outputs<BytesRef>
-
- org.apache.lucene.util.fst.ByteSequenceOutputs
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description BytesRef
add(BytesRef prefix, BytesRef output)
Eg add("foo", "bar") -> "foobar"BytesRef
common(BytesRef output1, BytesRef output2)
Eg common("foobar", "food") -> "foo"BytesRef
getNoOutput()
NOTE: this output is compared with == so you must ensure that all methods return the single object if it's really no outputstatic ByteSequenceOutputs
getSingleton()
java.lang.String
outputToString(BytesRef output)
BytesRef
read(DataInput in)
Decode an output value previously written withOutputs.write(Object, DataOutput)
.BytesRef
subtract(BytesRef output, BytesRef inc)
Eg subtract("foobar", "foo") -> "bar"void
write(BytesRef prefix, DataOutput out)
Encode an output value into aDataOutput
.-
Methods inherited from class org.apache.lucene.util.fst.Outputs
merge, readFinalOutput, writeFinalOutput
-
-
-
-
Method Detail
-
getSingleton
public static ByteSequenceOutputs getSingleton()
-
common
public BytesRef common(BytesRef output1, BytesRef output2)
Description copied from class:Outputs
Eg common("foobar", "food") -> "foo"
-
subtract
public BytesRef subtract(BytesRef output, BytesRef inc)
Description copied from class:Outputs
Eg subtract("foobar", "foo") -> "bar"
-
add
public BytesRef add(BytesRef prefix, BytesRef output)
Description copied from class:Outputs
Eg add("foo", "bar") -> "foobar"
-
write
public void write(BytesRef prefix, DataOutput out) throws java.io.IOException
Description copied from class:Outputs
Encode an output value into aDataOutput
.
-
read
public BytesRef read(DataInput in) throws java.io.IOException
Description copied from class:Outputs
Decode an output value previously written withOutputs.write(Object, DataOutput)
.
-
getNoOutput
public BytesRef getNoOutput()
Description copied from class:Outputs
NOTE: this output is compared with == so you must ensure that all methods return the single object if it's really no output- Specified by:
getNoOutput
in classOutputs<BytesRef>
-
outputToString
public java.lang.String outputToString(BytesRef output)
- Specified by:
outputToString
in classOutputs<BytesRef>
-
-