Package org.apache.lucene.util.fst
Class PositiveIntOutputs
- java.lang.Object
-
- org.apache.lucene.util.fst.Outputs<Long>
-
- org.apache.lucene.util.fst.PositiveIntOutputs
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Longadd(Long prefix, Long output)Eg add("foo", "bar") -> "foobar"Longcommon(Long output1, Long output2)Eg common("foobar", "food") -> "foo"LonggetNoOutput()NOTE: this output is compared with == so you must ensure that all methods return the single object if it's really no outputstatic PositiveIntOutputsgetSingleton()StringoutputToString(Long output)longramBytesUsed(Long output)Return memory usage for the provided output.Longread(DataInput in)Decode an output value previously written withOutputs.write(Object, DataOutput).Longsubtract(Long output, Long inc)Eg subtract("foobar", "foo") -> "bar"StringtoString()voidwrite(Long output, DataOutput out)Encode an output value into aDataOutput.-
Methods inherited from class org.apache.lucene.util.fst.Outputs
merge, readFinalOutput, skipFinalOutput, skipOutput, writeFinalOutput
-
-
-
-
Method Detail
-
getSingleton
public static PositiveIntOutputs getSingleton()
-
common
public Long common(Long output1, Long output2)
Description copied from class:OutputsEg common("foobar", "food") -> "foo"
-
subtract
public Long subtract(Long output, Long inc)
Description copied from class:OutputsEg subtract("foobar", "foo") -> "bar"
-
add
public Long add(Long prefix, Long output)
Description copied from class:OutputsEg add("foo", "bar") -> "foobar"
-
write
public void write(Long output, DataOutput out) throws IOException
Description copied from class:OutputsEncode an output value into aDataOutput.- Specified by:
writein classOutputs<Long>- Throws:
IOException
-
read
public Long read(DataInput in) throws IOException
Description copied from class:OutputsDecode an output value previously written withOutputs.write(Object, DataOutput).- Specified by:
readin classOutputs<Long>- Throws:
IOException
-
getNoOutput
public Long getNoOutput()
Description copied from class:OutputsNOTE: this output is compared with == so you must ensure that all methods return the single object if it's really no output- Specified by:
getNoOutputin classOutputs<Long>
-
outputToString
public String outputToString(Long output)
- Specified by:
outputToStringin classOutputs<Long>
-
ramBytesUsed
public long ramBytesUsed(Long output)
Description copied from class:OutputsReturn memory usage for the provided output.- Specified by:
ramBytesUsedin classOutputs<Long>- See Also:
Accountable
-
-