org.apache.lucene.util.fst

## Class CharSequenceOutputs

- java.lang.Object
- - org.apache.lucene.util.fst.Outputs<CharsRef>
  - - org.apache.lucene.util.fst.CharSequenceOutputs

    public final class CharSequenceOutputs
    extends Outputs<CharsRef>

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

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

### Method Summary

Methods
`CharsRef` `add(CharsRef prefix, CharsRef output)` Eg add("foo", "bar") -> "foobar"
`CharsRef` `common(CharsRef output1, CharsRef output2)` Eg common("foo", "foobar") -> "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 output
`static CharSequenceOutputs` `getSingleton()`
`String` `outputToString(CharsRef output)`
`CharsRef` `read(DataInput in)` Decode an output value previously written with `Outputs.write(Object, DataOutput)`.
`CharsRef` `subtract(CharsRef output, CharsRef inc)` Eg subtract("foobar", "foo") -> "bar"
`void` `write(CharsRef 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 CharSequenceOutputs getSingleton()

#### common

    public CharsRef common(CharsRef output1,
                  CharsRef output2)

Description copied from class: `Outputs`
Eg common("foo", "foobar") -> "foo"

Specified by:
  `common` in class `Outputs<CharsRef>`

#### subtract

    public CharsRef subtract(CharsRef output,
                    CharsRef inc)

Description copied from class: `Outputs`
Eg subtract("foobar", "foo") -> "bar"

Specified by:
  `subtract` in class `Outputs<CharsRef>`

#### add

    public CharsRef add(CharsRef prefix,
               CharsRef output)

Description copied from class: `Outputs`
Eg add("foo", "bar") -> "foobar"

Specified by:
  `add` in class `Outputs<CharsRef>`

#### write

    public void write(CharsRef prefix,
             DataOutput out)
               throws IOException

Description copied from class: `Outputs`
Encode an output value into a `DataOutput`.

Specified by:
  `write` in class `Outputs<CharsRef>`
Throws:
  `IOException`

#### read

    public CharsRef 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<CharsRef>`
Throws:
  `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 class `Outputs<CharsRef>`

#### outputToString

    public String outputToString(CharsRef output)

Specified by:
  `outputToString` in class `Outputs<CharsRef>`