org.apache.lucene.util.fst
Class IntSequenceOutputs

java.lang.Object
  extended by org.apache.lucene.util.fst.Outputs<IntsRef>
      extended by org.apache.lucene.util.fst.IntSequenceOutputs

public final class IntSequenceOutputs
extends Outputs<IntsRef>

An FST Outputs implementation where each output is a sequence of ints.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Method Summary
 IntsRef add(IntsRef prefix, IntsRef output)
          Eg add("foo", "bar") -> "foobar"
 IntsRef common(IntsRef output1, IntsRef output2)
          Eg common("foo", "foobar") -> "foo"
 IntsRef getNoOutput()
          NOTE: this output is compared with == so you must ensure that all methods return the single object if it's really no output
static IntSequenceOutputs getSingleton()
           
 String outputToString(IntsRef output)
           
 IntsRef read(DataInput in)
          Decode an output value previously written with Outputs.write(Object, DataOutput).
 IntsRef subtract(IntsRef output, IntsRef inc)
          Eg subtract("foobar", "foo") -> "bar"
 void write(IntsRef prefix, DataOutput out)
          Encode an output value into a DataOutput.
 
Methods inherited from class org.apache.lucene.util.fst.Outputs
merge, readFinalOutput, writeFinalOutput
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getSingleton

public static IntSequenceOutputs getSingleton()

common

public IntsRef common(IntsRef output1,
                      IntsRef output2)
Description copied from class: Outputs
Eg common("foo", "foobar") -> "foo"

Specified by:
common in class Outputs<IntsRef>

subtract

public IntsRef subtract(IntsRef output,
                        IntsRef inc)
Description copied from class: Outputs
Eg subtract("foobar", "foo") -> "bar"

Specified by:
subtract in class Outputs<IntsRef>

add

public IntsRef add(IntsRef prefix,
                   IntsRef output)
Description copied from class: Outputs
Eg add("foo", "bar") -> "foobar"

Specified by:
add in class Outputs<IntsRef>

write

public void write(IntsRef prefix,
                  DataOutput out)
           throws IOException
Description copied from class: Outputs
Encode an output value into a DataOutput.

Specified by:
write in class Outputs<IntsRef>
Throws:
IOException

read

public IntsRef read(DataInput in)
             throws IOException
Description copied from class: Outputs
Decode an output value previously written with Outputs.write(Object, DataOutput).

Specified by:
read in class Outputs<IntsRef>
Throws:
IOException

getNoOutput

public IntsRef 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 class Outputs<IntsRef>

outputToString

public String outputToString(IntsRef output)
Specified by:
outputToString in class Outputs<IntsRef>


Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.