- java.lang.Object
-
- org.apache.lucene.util.fst.Outputs<BytesRef>
-
- org.apache.lucene.util.fst.ByteSequenceOutputs
-
-
Field Summary
Fields Modifier and Type Field Description private static long
BASE_NUM_BYTES
private static BytesRef
NO_OUTPUT
private static ByteSequenceOutputs
singleton
-
Constructor Summary
Constructors Modifier Constructor Description private
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)
long
ramBytesUsed(BytesRef output)
Return memory usage for the provided output.BytesRef
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.BytesRef
subtract(BytesRef output, BytesRef inc)
Eg subtract("foobar", "foo") -> "bar"java.lang.String
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 Detail
-
NO_OUTPUT
private static final BytesRef NO_OUTPUT
-
singleton
private static final ByteSequenceOutputs singleton
-
BASE_NUM_BYTES
private static final long BASE_NUM_BYTES
-
-
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)
.
-
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<BytesRef>
- Throws:
java.io.IOException
-
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>
-
ramBytesUsed
public long ramBytesUsed(BytesRef output)
Description copied from class:Outputs
Return memory usage for the provided output.- Specified by:
ramBytesUsed
in classOutputs<BytesRef>
- See Also:
Accountable
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-