| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.lang3.tuple.Pair<L,R>
org.apache.commons.lang3.tuple.MutablePair<L,R>
L - the left element typeR - the right element typepublic class MutablePair<L,R>
A mutable pair consisting of two Object elements.
Not #ThreadSafe#
| Field Summary | |
|---|---|
 L | 
left
Left object  | 
 R | 
right
Right object  | 
| Constructor Summary | |
|---|---|
MutablePair()
Create a new pair instance of two nulls.  | 
|
MutablePair(L left,
                       R right)
Create a new pair instance.  | 
|
| Method Summary | ||
|---|---|---|
 L | 
getLeft()
Gets the left element from this pair.  | 
|
 R | 
getRight()
Gets the right element from this pair.  | 
|
static
 | 
of(L left,
     R right)
Obtains an immutable pair of from two objects inferring the generic types.  | 
|
 void | 
setLeft(L left)
Sets the left element of the pair.  | 
|
 void | 
setRight(R right)
Sets the right element of the pair.  | 
|
 R | 
setValue(R value)
Sets the Map.Entry value. | 
|
| Methods inherited from class org.apache.commons.lang3.tuple.Pair | 
|---|
compareTo, equals, getKey, getValue, hashCode, toString, toString | 
| Methods inherited from class java.lang.Object | 
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
|---|
public L left
public R right
| Constructor Detail | 
|---|
public MutablePair()
public MutablePair(L left,
                   R right)
left - the left value, may be nullright - the right value, may be null| Method Detail | 
|---|
public static <L,R> MutablePair<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 null
public L getLeft()
Gets the left element from this pair.
When treated as a key-value pair, this is the key.
getLeft in class Pair<L,R>public void setLeft(L left)
left - the new value of the left element, may be nullpublic R getRight()
Gets the right element from this pair.
When treated as a key-value pair, this is the value.
getRight in class Pair<L,R>public void setRight(R right)
right - the new value of the right element, may be nullpublic R setValue(R value)
Map.Entry value.
 This sets the right element of the pair.
value - the right value to set, not null
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||