Package org.apache.lucene.util.fst

# Class NoOutputs

java.lang.Object
org.apache.lucene.util.fst.Outputs<Object>
org.apache.lucene.util.fst.NoOutputs

public final class NoOutputs extends Outputs<Object>
A null FST `Outputs` implementation; use this if you just want to build an FSA.

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

## Method Summary

Modifier and Type
Method
Description
`Object`
`add(Object prefix, Object output)`
Eg add("foo", "bar") -> "foobar"
`Object`
`common(Object output1, Object output2)`
Eg common("foobar", "food") -> "foo"
`Object`
`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 NoOutputs`
`getSingleton()`
`Object`
`merge(Object first, Object second)`
`String`
`outputToString(Object output)`
`long`
`ramBytesUsed(Object output)`
Return memory usage for the provided output.
`Object`
`read(DataInput in)`
Decode an output value previously written with `Outputs.write(Object, DataOutput)`.
`Object`
`subtract(Object output, Object inc)`
Eg subtract("foobar", "foo") -> "bar"
`String`
`toString()`
`void`
`write(Object prefix, DataOutput out)`
Encode an output value into a `DataOutput`.

### Methods inherited from class org.apache.lucene.util.fst.Outputs

`readFinalOutput, skipFinalOutput, skipOutput, writeFinalOutput`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Method Details

### getSingleton

public static NoOutputs getSingleton()

### common

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

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

### subtract

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

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

### add

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

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

### merge

public Object merge(Object first, Object second)

Overrides:
  `merge` in class `Outputs<Object>`

### write

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

Specified by:
  `write` in class `Outputs<Object>`

### read

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

Specified by:
  `read` in class `Outputs<Object>`

### getNoOutput

public Object 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<Object>`

### outputToString

public String outputToString(Object output)

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

### ramBytesUsed

public long ramBytesUsed(Object output)
Description copied from class: `Outputs`
Return memory usage for the provided output.

Specified by:
  `ramBytesUsed` in class `Outputs<Object>`
See Also:
  - `Accountable`

### toString

public String toString()

Overrides:
  `toString` in class `Object`