L
- Type of the left elementR
- Type of the right elementpublic class PairWritable<L extends org.apache.hadoop.io.Writable,R extends org.apache.hadoop.io.Writable>
extends org.apache.commons.lang3.tuple.Pair<L,R>
implements org.apache.hadoop.io.Writable
Constructor and Description |
---|
PairWritable(L left,
R right)
Create a new pair instance.
|
Modifier and Type | Method and Description |
---|---|
L |
getLeft() |
R |
getRight() |
static <L extends org.apache.hadoop.io.Writable,R extends org.apache.hadoop.io.Writable> |
of(L left,
R right)
Obtains an immutable pair of from two objects inferring
the generic types.
|
void |
readFields(DataInput in) |
R |
setValue(R value)
Throws
UnsupportedOperationException . |
void |
write(DataOutput out) |
compareTo, equals, getKey, getValue, hashCode, toString, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
comparingByKey, comparingByKey, comparingByValue, comparingByValue
public static <L extends org.apache.hadoop.io.Writable,R extends org.apache.hadoop.io.Writable> PairWritable<L,R> of(L left, R right)
Obtains an immutable pair of from two objects inferring the generic types.
This factory allows the pair to be created using inference to obtain the generic types.
L
- the left element typeR
- the right element typeleft
- the left element, may be nullright
- the right element, may be nullpublic final L getLeft()
public final R getRight()
public final R setValue(R value)
Throws UnsupportedOperationException
.
This pair is immutable, so this operation is not supported.
setValue
in interface Map.Entry<L extends org.apache.hadoop.io.Writable,R extends org.apache.hadoop.io.Writable>
value
- the value to setUnsupportedOperationException
- as this operation is not supportedpublic final void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
public final void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.