public final class UpToTwoPositiveIntOutputs extends Outputs<Object>
Outputs
implementation where each output
is one or two non-negative long values. If it's a
single output, Long is returned; else, TwoLongs. Order
is preserved in the TwoLongs case, ie .first is the first
input/output added to Builder, and .second is the
second. You cannot store 0 output with this (that's
reserved to mean "no output")!
NOTE: the resulting FST is not guaranteed to be minimal!
See Builder
.Modifier and Type | Class and Description |
---|---|
static class |
UpToTwoPositiveIntOutputs.TwoLongs
Holds two long outputs.
|
Modifier and Type | Method and Description |
---|---|
Object |
add(Object _prefix,
Object _output)
Eg add("foo", "bar") -> "foobar"
|
Long |
common(Object _output1,
Object _output2)
Eg common("foo", "foobar") -> "foo"
|
Long |
get(long v) |
UpToTwoPositiveIntOutputs.TwoLongs |
get(long first,
long second) |
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 UpToTwoPositiveIntOutputs |
getSingleton(boolean doShare) |
Object |
merge(Object first,
Object second) |
String |
outputToString(Object output) |
Object |
read(DataInput in) |
Long |
subtract(Object _output,
Object _inc)
Eg subtract("foobar", "foo") -> "bar"
|
void |
write(Object _output,
DataOutput out) |
public static UpToTwoPositiveIntOutputs getSingleton(boolean doShare)
public Long get(long v)
public UpToTwoPositiveIntOutputs.TwoLongs get(long first, long second)
public Long common(Object _output1, Object _output2)
Outputs
public Long subtract(Object _output, Object _inc)
Outputs
public Object add(Object _prefix, Object _output)
Outputs
public void write(Object _output, DataOutput out) throws IOException
write
in class Outputs<Object>
IOException
public Object read(DataInput in) throws IOException
read
in class Outputs<Object>
IOException
public Object getNoOutput()
Outputs
getNoOutput
in class Outputs<Object>
public String outputToString(Object output)
outputToString
in class Outputs<Object>