- java.lang.Object
-
- org.apache.lucene.util.fst.Outputs<CharsRef>
-
- org.apache.lucene.util.fst.CharSequenceOutputs
-
-
Field Summary
Fields Modifier and Type Field Description private static long
BASE_NUM_BYTES
private static CharsRef
NO_OUTPUT
private static CharSequenceOutputs
singleton
-
Constructor Summary
Constructors Modifier Constructor Description private
CharSequenceOutputs()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CharsRef
add(CharsRef prefix, CharsRef output)
Eg add("foo", "bar") -> "foobar"CharsRef
common(CharsRef output1, CharsRef output2)
Eg common("foobar", "food") -> "foo"CharsRef
getNoOutput()
NOTE: this output is compared with == so you must ensure that all methods return the single object if it's really no outputstatic CharSequenceOutputs
getSingleton()
java.lang.String
outputToString(CharsRef output)
long
ramBytesUsed(CharsRef output)
Return memory usage for the provided output.CharsRef
read(DataInput in)
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.CharsRef
subtract(CharsRef output, CharsRef inc)
Eg subtract("foobar", "foo") -> "bar"void
write(CharsRef prefix, DataOutput out)
Encode an output value into aDataOutput
.-
Methods inherited from class org.apache.lucene.util.fst.Outputs
merge, readFinalOutput, skipFinalOutput, writeFinalOutput
-
-
-
-
Field Detail
-
NO_OUTPUT
private static final CharsRef NO_OUTPUT
-
singleton
private static final CharSequenceOutputs singleton
-
BASE_NUM_BYTES
private static final long BASE_NUM_BYTES
-
-
Method Detail
-
getSingleton
public static CharSequenceOutputs getSingleton()
-
common
public CharsRef common(CharsRef output1, CharsRef output2)
Description copied from class:Outputs
Eg common("foobar", "food") -> "foo"
-
subtract
public CharsRef subtract(CharsRef output, CharsRef inc)
Description copied from class:Outputs
Eg subtract("foobar", "foo") -> "bar"
-
add
public CharsRef add(CharsRef prefix, CharsRef output)
Description copied from class:Outputs
Eg add("foo", "bar") -> "foobar"
-
write
public void write(CharsRef prefix, DataOutput out) throws java.io.IOException
Description copied from class:Outputs
Encode an output value into aDataOutput
.
-
read
public CharsRef read(DataInput in) throws java.io.IOException
Description copied from class:Outputs
Decode an output value previously written withOutputs.write(Object, DataOutput)
.
-
skipOutput
public void skipOutput(DataInput in) throws java.io.IOException
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<CharsRef>
- Throws:
java.io.IOException
-
getNoOutput
public CharsRef 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<CharsRef>
-
outputToString
public java.lang.String outputToString(CharsRef output)
- Specified by:
outputToString
in classOutputs<CharsRef>
-
ramBytesUsed
public long ramBytesUsed(CharsRef output)
Description copied from class:Outputs
Return memory usage for the provided output.- Specified by:
ramBytesUsed
in classOutputs<CharsRef>
- See Also:
Accountable
-
-