L - the left element typeM - the middle element typeR - the right element typepublic class MutableTriple<L,M,R> extends Triple<L,M,R>
Object elements.
 Not #ThreadSafe#
| Modifier and Type | Field and Description | 
|---|---|
static MutableTriple<?,?,?>[] | 
EMPTY_ARRAY
The empty array singleton. 
 | 
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 | 
|---|---|
static <L,M,R> MutableTriple<L,M,R>[] | 
emptyArray()
Returns the empty array singleton that can be assigned without compiler warning. 
 | 
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. 
 | 
static <L,M,R> MutableTriple<L,M,R> | 
ofNonNull(L left,
         M middle,
         R right)
Obtains a mutable triple of three non-null 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 static final MutableTriple<?,?,?>[] EMPTY_ARRAY
 Consider using emptyArray() to avoid generics warnings.
 
public L left
public M middle
public R right
public MutableTriple()
public static <L,M,R> MutableTriple<L,M,R>[] emptyArray()
L - the left element typeM - the middle element typeR - the right element typepublic static <L,M,R> MutableTriple<L,M,R> of(L left, M middle, R right)
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 static <L,M,R> MutableTriple<L,M,R> ofNonNull(L left, M middle, R right)
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 not be nullmiddle - the middle element, may not be nullright - the right element, may not be nulljava.lang.NullPointerException - if any input is nullpublic L getLeft()
public M getMiddle()
public R getRight()
public 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 nullpublic void setRight(R right)
right - the new value of the right element, may be nullCopyright © 2010 - 2023 Adobe. All Rights Reserved