An FST
Outputs
implementation where each output is a sequence of bytes.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final long
private static final BytesRef
private static final ByteSequenceOutputs
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionEg add("foo", "bar") -> "foobar"Eg common("foobar", "food") -> "foo"NOTE: this output is compared with == so you must ensure that all methods return the single object if it's really no outputstatic ByteSequenceOutputs
outputToString
(BytesRef output) long
ramBytesUsed
(BytesRef output) Return memory usage for the provided output.Decode an output value previously written withOutputs.write(Object, DataOutput)
.void
skipOutput
(DataInput in) Skip the output; defaults to just callingOutputs.read(org.apache.lucene.store.DataInput)
and discarding the result.Eg subtract("foobar", "foo") -> "bar"toString()
void
write
(BytesRef prefix, DataOutput out) Encode an output value into aDataOutput
.Methods inherited from class org.apache.lucene.util.fst.Outputs
merge, readFinalOutput, skipFinalOutput, writeFinalOutput
-
Field Details
-
NO_OUTPUT
-
singleton
-
BASE_NUM_BYTES
private static final long BASE_NUM_BYTES
-
-
Constructor Details
-
ByteSequenceOutputs
private ByteSequenceOutputs()
-
-
Method Details
-
getSingleton
-
common
Description copied from class:Outputs
Eg common("foobar", "food") -> "foo" -
subtract
Description copied from class:Outputs
Eg subtract("foobar", "foo") -> "bar" -
add
Description copied from class:Outputs
Eg add("foo", "bar") -> "foobar" -
write
Description copied from class:Outputs
Encode an output value into aDataOutput
.- Specified by:
write
in classOutputs<BytesRef>
- Throws:
IOException
-
read
Description copied from class:Outputs
Decode an output value previously written withOutputs.write(Object, DataOutput)
.- Specified by:
read
in classOutputs<BytesRef>
- Throws:
IOException
-
skipOutput
Description copied from class:Outputs
Skip the output; defaults to just callingOutputs.read(org.apache.lucene.store.DataInput)
and discarding the result.- Overrides:
skipOutput
in classOutputs<BytesRef>
- Throws:
IOException
-
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
- Specified by:
outputToString
in classOutputs<BytesRef>
-
ramBytesUsed
Description copied from class:Outputs
Return memory usage for the provided output.- Specified by:
ramBytesUsed
in classOutputs<BytesRef>
- See Also:
-
toString
-