Top Description Fields Constructors Methods
org.apache.commons.lang3.tuple

public Class MutableTriple<L, M, R>

extends Triple<L, M, R>
Class Inheritance
Type Parameters
<L>
the left element type.
<M>
the middle element type.
<R>
the right element type.
Imports
java.util.Objects

A mutable triple consisting of three Object elements.

Not #ThreadSafe#

Since
3.2

Field Summary

Modifier and TypeField and Description
public static final MutableTriple<?, ?, ?>[]
public L
left

Left object.

public M
middle

Middle object.

public R
right

Right object.

private static final long

Constructor Summary

AccessConstructor and Description
public
MutableTriple()

Create a new triple instance of three nulls.

public
MutableTriple(final L
the left value, may be null.
left
,
final M
the middle value, may be null.
middle
,
final R
the right value, may be null.
right
)

Create a new triple instance.

Method Summary

Modifier and TypeMethod and Description
public static <
the left element type.
L
,
the middle element type.
M
,
the right element type.
R
>
MutableTriple<L, M, R>[]

Returns:

the empty array singleton that can be assigned without compiler warning.
emptyArray
()

Hides org.apache.commons.lang3.tuple.Triple.emptyArray.

Returns the empty array singleton that can be assigned without compiler warning.

public L
getLeft()

Implements abstract org.apache.commons.lang3.tuple.Triple.getLeft.

Gets the left element from this triple.

public M
getMiddle()

Implements abstract org.apache.commons.lang3.tuple.Triple.getMiddle.

Gets the middle element from this triple.

public R
getRight()

Implements abstract org.apache.commons.lang3.tuple.Triple.getRight.

Gets the right element from this triple.

public static <
the left element type.
L
,
the middle element type.
M
,
the right element type.
R
>
MutableTriple<L, M, R>

Returns:

a mutable triple formed from the three parameters, not null.
of
(final L
the left element, may be null.
left
,
final M
the middle element, may be null.
middle
,
final R
the right element, may be null.
right
)

Hides org.apache.commons.lang3.tuple.Triple.of.

Obtains a mutable triple of three objects inferring the generic types.

public static <
the left element type.
L
,
the middle element type.
M
,
the right element type.
R
>
MutableTriple<L, M, R>

Returns:

a mutable triple formed from the three parameters, not null.
ofNonNull
(final L
the left element, may not be null.
left
,
final M
the middle element, may not be null.
middle
,
final R
the right element, may not be null.
right
)

Hides org.apache.commons.lang3.tuple.Triple.ofNonNull.

Obtains a mutable triple of three non-null objects inferring the generic types.

public void
setLeft(final L
the new value of the left element, may be null.
left
)

Sets the left element of the triple.

public void
setMiddle(final M
the new value of the middle element, may be null.
middle
)

Sets the middle element of the triple.

public void
setRight(final R
the new value of the right element, may be null.
right
)

Sets the right element of the triple.

Inherited from org.apache.commons.lang3.tuple.Triple:
compareToequalshashCodetoStringtoString

Field Detail

EMPTY_ARRAYback to summary
public static final MutableTriple<?, ?, ?>[] EMPTY_ARRAY

Hides org.apache.commons.lang3.tuple.Triple.EMPTY_ARRAY.

The empty array singleton.

Consider using emptyArray() to avoid generics warnings.

Since
3.10
leftback to summary
public L left

Left object.

middleback to summary
public M middle

Middle object.

serialVersionUIDback to summary
private static final long serialVersionUID

Hides org.apache.commons.lang3.tuple.Triple.serialVersionUID.

Serialization version

Constructor Detail

MutableTripleback to summary
public MutableTriple()

Create a new triple instance of three nulls.

MutableTripleback to summary
public MutableTriple(final L left, final M middle, final R right)

Create a new triple instance.

Parameters
left:L

the left value, may be null.

middle:M

the middle value, may be null.

right:R

the right value, may be null.

Method Detail

emptyArrayback to summary
public static <L, M, R> MutableTriple<L, M, R>[] emptyArray()

Hides org.apache.commons.lang3.tuple.Triple.emptyArray.

Returns the empty array singleton that can be assigned without compiler warning.

Parameters
<L>
the left element type.
<M>
the middle element type.
<R>
the right element type.
Returns:MutableTriple<L, M, R>[]

the empty array singleton that can be assigned without compiler warning.

Annotations
@SuppressWarnings:unchecked
Since
3.10
getLeftback to summary
public L getLeft()

Implements abstract org.apache.commons.lang3.tuple.Triple.getLeft.

Doc from org.apache.commons.lang3.tuple.Triple.getLeft.

Gets the left element from this triple.

Annotations
@Override
getMiddleback to summary
public M getMiddle()

Implements abstract org.apache.commons.lang3.tuple.Triple.getMiddle.

Doc from org.apache.commons.lang3.tuple.Triple.getMiddle.

Gets the middle element from this triple.

Annotations
@Override
getRightback to summary
public R getRight()

Implements abstract org.apache.commons.lang3.tuple.Triple.getRight.

Doc from org.apache.commons.lang3.tuple.Triple.getRight.

Gets the right element from this triple.

Annotations
@Override
ofback to summary
public static <L, M, R> MutableTriple<L, M, R> of(final L left, final M middle, final R right)

Hides org.apache.commons.lang3.tuple.Triple.of.

Obtains a mutable triple of three objects inferring the generic types.

Parameters
<L>
the left element type.
<M>
the middle element type.
<R>
the right element type.
left:L

the left element, may be null.

middle:M

the middle element, may be null.

right:R

the right element, may be null.

Returns:MutableTriple<L, M, R>

a mutable triple formed from the three parameters, not null.

ofNonNullback to summary
public static <L, M, R> MutableTriple<L, M, R> ofNonNull(final L left, final M middle, final R right)

Hides org.apache.commons.lang3.tuple.Triple.ofNonNull.

Obtains a mutable triple of three non-null objects inferring the generic types.

Parameters
<L>
the left element type.
<M>
the middle element type.
<R>
the right element type.
left:L

the left element, may not be null.

middle:M

the middle element, may not be null.

right:R

the right element, may not be null.

Returns:MutableTriple<L, M, R>

a mutable triple formed from the three parameters, not null.

Exceptions
NullPointerException:
if any input is null.
Since
3.13.0
setLeftback to summary
public void setLeft(final L left)

Sets the left element of the triple.

Parameters
left:L

the new value of the left element, may be null.

setMiddleback to summary
public void setMiddle(final M middle)

Sets the middle element of the triple.

Parameters
middle:M

the new value of the middle element, may be null.

setRightback to summary
public void setRight(final R right)

Sets the right element of the triple.

Parameters
right:R

the new value of the right element, may be null.