L
- the left element typeM
- the middle element typeR
- the right element typepublic class MutableTriple<L,M,R> extends Triple<L,M,R>
A mutable triple consisting of three Object
elements.
Not #ThreadSafe#
Modifier and Type | Field and Description |
---|---|
L |
left
Left object
|
M |
middle
Middle object
|
R |
right
Right object
|
Constructor and Description |
---|
MutableTriple()
Create a new triple instance of three nulls.
|
MutableTriple(L left,
M middle,
R right)
Create a new triple instance.
|
Modifier and Type | Method and Description |
---|---|
L |
getLeft()
Gets the left element from this triple.
|
M |
getMiddle()
Gets the middle element from this triple.
|
R |
getRight()
Gets the right element from this triple.
|
static <L,M,R> MutableTriple<L,M,R> |
of(L left,
M middle,
R right)
Obtains a mutable triple of three objects inferring the generic types.
|
void |
setLeft(L left)
Sets the left element of the triple.
|
void |
setMiddle(M middle)
Sets the middle element of the triple.
|
void |
setRight(R right)
Sets the right element of the triple.
|
public MutableTriple()
public MutableTriple(L left, M middle, R right)
left
- the left value, may be nullmiddle
- the middle value, may be nullright
- the right value, may be nullpublic static <L,M,R> MutableTriple<L,M,R> of(L left, M middle, R right)
Obtains a mutable triple of three objects inferring the generic types.
This factory allows the triple to be created using inference to obtain the generic types.
L
- the left element typeM
- the middle element typeR
- the right element typeleft
- the left element, may be nullmiddle
- the middle element, may be nullright
- the right element, may be nullpublic void setLeft(L left)
left
- the new value of the left element, may be nullpublic void setMiddle(M middle)
middle
- the new value of the middle element, may be nullCopyright © 2001–2019 The Apache Software Foundation. All rights reserved.