public class PairOfWritables<L extends org.apache.hadoop.io.Writable,R extends org.apache.hadoop.io.Writable> extends Object implements org.apache.hadoop.io.Writable
Constructor and Description |
---|
PairOfWritables()
Creates a new
PairOfWritables . |
PairOfWritables(L left,
R right)
Creates a new
PairOfWritables . |
Modifier and Type | Method and Description |
---|---|
L |
getKey()
Returns the key (left element).
|
L |
getLeftElement()
Returns the left element.
|
R |
getRightElement()
Returns the right element.
|
R |
getValue()
Returns the value (right element).
|
void |
readFields(DataInput in)
Deserializes the pair.
|
void |
set(L left,
R right)
Sets the right and left elements of this pair.
|
String |
toString()
Generates human-readable String representation of this pair.
|
void |
write(DataOutput out)
Serializes this pair.
|
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
in
- source for raw byte representationIOException
public void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
out
- where to write the raw byte representationIOException
public L getLeftElement()
public R getRightElement()
public L getKey()
public R getValue()
public void set(L left, R right)
left
- the left elementright
- the right elementCopyright © 2018. All rights reserved.