public class PairOutputs<A,B> extends Outputs<PairOutputs.Pair<A,B>>
Outputs
implementation, holding two other outputs.Modifier and Type | Class and Description |
---|---|
static class |
PairOutputs.Pair<A,B>
Holds a single pair of two outputs.
|
Constructor and Description |
---|
PairOutputs(Outputs<A> outputs1,
Outputs<B> outputs2) |
Modifier and Type | Method and Description |
---|---|
PairOutputs.Pair<A,B> |
add(PairOutputs.Pair<A,B> prefix,
PairOutputs.Pair<A,B> output)
Eg add("foo", "bar") -> "foobar"
|
PairOutputs.Pair<A,B> |
common(PairOutputs.Pair<A,B> pair1,
PairOutputs.Pair<A,B> pair2)
Eg common("foobar", "food") -> "foo"
|
PairOutputs.Pair<A,B> |
getNoOutput()
NOTE: this output is compared with == so you must
ensure that all methods return the single object if
it's really no output
|
PairOutputs.Pair<A,B> |
newPair(A a,
B b)
Create a new Pair
|
String |
outputToString(PairOutputs.Pair<A,B> output) |
long |
ramBytesUsed(PairOutputs.Pair<A,B> output)
Return memory usage for the provided output.
|
PairOutputs.Pair<A,B> |
read(DataInput in)
Decode an output value previously written with
Outputs.write(Object, DataOutput) . |
void |
skipOutput(DataInput in)
Skip the output; defaults to just calling
Outputs.read(org.apache.lucene.store.DataInput)
and discarding the result. |
PairOutputs.Pair<A,B> |
subtract(PairOutputs.Pair<A,B> output,
PairOutputs.Pair<A,B> inc)
Eg subtract("foobar", "foo") -> "bar"
|
String |
toString() |
void |
write(PairOutputs.Pair<A,B> output,
DataOutput writer)
Encode an output value into a
DataOutput . |
merge, readFinalOutput, skipFinalOutput, writeFinalOutput
public PairOutputs.Pair<A,B> newPair(A a, B b)
public PairOutputs.Pair<A,B> common(PairOutputs.Pair<A,B> pair1, PairOutputs.Pair<A,B> pair2)
Outputs
common
in class Outputs<PairOutputs.Pair<A,B>>
public PairOutputs.Pair<A,B> subtract(PairOutputs.Pair<A,B> output, PairOutputs.Pair<A,B> inc)
Outputs
subtract
in class Outputs<PairOutputs.Pair<A,B>>
public PairOutputs.Pair<A,B> add(PairOutputs.Pair<A,B> prefix, PairOutputs.Pair<A,B> output)
Outputs
add
in class Outputs<PairOutputs.Pair<A,B>>
public void write(PairOutputs.Pair<A,B> output, DataOutput writer) throws IOException
Outputs
DataOutput
.write
in class Outputs<PairOutputs.Pair<A,B>>
IOException
public PairOutputs.Pair<A,B> read(DataInput in) throws IOException
Outputs
Outputs.write(Object, DataOutput)
.read
in class Outputs<PairOutputs.Pair<A,B>>
IOException
public void skipOutput(DataInput in) throws IOException
Outputs
Outputs.read(org.apache.lucene.store.DataInput)
and discarding the result.skipOutput
in class Outputs<PairOutputs.Pair<A,B>>
IOException
public PairOutputs.Pair<A,B> getNoOutput()
Outputs
getNoOutput
in class Outputs<PairOutputs.Pair<A,B>>
public String outputToString(PairOutputs.Pair<A,B> output)
outputToString
in class Outputs<PairOutputs.Pair<A,B>>
public long ramBytesUsed(PairOutputs.Pair<A,B> output)
Outputs
ramBytesUsed
in class Outputs<PairOutputs.Pair<A,B>>
Accountable
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.