Overview | Package | Class | Use | Tree | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.lucene.util.fst
Class PositiveIntOutputs

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

    public final class PositiveIntOutputs

extends Outputs<Long>

An FST `Outputs` implementation where each output is a non-negative long value.

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

Method Summary
`Long` | `add(Long prefix, Long output)` Eg add("foo", "bar") -> "foobar"
`Long` | `common(Long output1, Long output2)` Eg common("foo", "foobar") -> "foo"
`Long` | `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 PositiveIntOutputs` | `getSingleton()` Returns the instance of PositiveIntOutputs.
`static PositiveIntOutputs` | `getSingleton(boolean doShare)` Expert: pass doShare=false to disable output sharing.
`String` | `outputToString(Long output)`
`Long` | `read(DataInput in)` Decode an output value previously written with `Outputs.write(Object, DataOutput)`.
`Long` | `subtract(Long output, Long inc)` Eg subtract("foobar", "foo") -> "bar"
`String` | `toString()`
`void` | `write(Long output, 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, wait, wait, wait`

Method Detail

### getSingleton

    public static PositiveIntOutputs getSingleton()

  Returns the instance of PositiveIntOutputs.

### getSingleton

    public static PositiveIntOutputs getSingleton(boolean doShare)

  Expert: pass doShare=false to disable output sharing. In some cases this may result in a smaller FST, however it will also break methods like `Util.getByOutput(org.apache.lucene.util.fst.FST, long)` and `Util.shortestPaths(org.apache.lucene.util.fst.FST, org.apache.lucene.util.fst.FST.Arc, T, java.util.Comparator, int, boolean)`.

### common

    public Long common(Long output1,
                       Long output2)

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

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

### subtract

    public Long subtract(Long output,
                         Long inc)

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

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

### add

    public Long add(Long prefix,
                    Long output)

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

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

### write

    public void write(Long output,
                      DataOutput out)
               throws IOException

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

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

### read

    public Long 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<Long>`
  Throws:
    `IOException`

### getNoOutput

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

### outputToString

    public String outputToString(Long output)

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

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

Overview | Package | Class | Use | Tree | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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