L
- M
- R
- public final class Triple<L,M,R> extends Object
Constructor and Description |
---|
Triple() |
Modifier and Type | Method and Description |
---|---|
<E extends Exception> |
accept(Throwables.Consumer<? super Triple<L,M,R>,E> action) |
<E extends Exception> |
accept(Throwables.TriConsumer<? super L,? super M,? super R,E> action) |
Triple<L,M,R> |
copy() |
boolean |
equals(Object obj) |
<E extends Exception> |
filter(Throwables.Predicate<? super Triple<L,M,R>,E> predicate) |
<E extends Exception> |
filter(Throwables.TriPredicate<? super L,? super M,? super R,E> predicate) |
<E extends Exception> |
forEach(Throwables.Consumer<?,E> comsumer) |
L |
getAndSetLeft(L newLeft)
Gets the and set left.
|
M |
getAndSetMiddle(M newMiddle)
Gets the and set middle.
|
R |
getAndSetRight(R newRight)
Gets the and set right.
|
L |
getLeft()
Gets the left.
|
M |
getMiddle()
Gets the middle.
|
R |
getRight()
Gets the right.
|
int |
hashCode() |
<U,E extends Exception> |
map(Throwables.Function<? super Triple<L,M,R>,U,E> mapper) |
<U,E extends Exception> |
map(Throwables.TriFunction<? super L,? super M,? super R,U,E> mapper) |
static <L,M,R> Triple<L,M,R> |
of(L l,
M m,
R r) |
Triple<R,M,L> |
reverse()
Returns a new instance of Triple<R, M, L>.
|
void |
set(L left,
M middle,
R right) |
L |
setAndGetLeft(L newLeft)
Sets the and get left.
|
M |
setAndGetMiddle(M newMiddle)
Sets the and get middle.
|
R |
setAndGetRight(R newRight)
Sets the and get right.
|
<E extends Exception> |
setIf(L newLeft,
M newMiddle,
R newRight,
Throwables.QuadPredicate<? super Triple<L,M,R>,? super L,? super M,? super R,E> predicate)
Set to the specified
newLeft and newRight and
returns true if predicate returns true. |
void |
setLeft(L left)
Sets the left.
|
<E extends Exception> |
setLeftIf(L newLeft,
Throwables.BiPredicate<? super Triple<L,M,R>,? super L,E> predicate)
Set to the specified
newLeft and returns true
if predicate returns true. |
void |
setMiddle(M middle)
Sets the middle.
|
<E extends Exception> |
setMiddleIf(M newMiddle,
Throwables.BiPredicate<? super Triple<L,M,R>,? super M,E> predicate)
Set to the specified
newMiddle and returns true
if predicate returns true. |
void |
setRight(R right)
Sets the right.
|
<E extends Exception> |
setRightIf(R newRight,
Throwables.BiPredicate<? super Triple<L,M,R>,? super R,E> predicate)
Set to the specified
newRight and returns true
if predicate returns true. |
Stream<Triple<L,M,R>> |
stream() |
<T,E extends Exception> |
stream(Throwables.Function<? super Triple<L,M,R>,Stream<T>,E> func) |
Object[] |
toArray() |
<A> A[] |
toArray(A[] a) |
u.Optional<Triple<L,M,R>> |
toOptional() |
String |
toString() |
Tuple.Tuple3<L,M,R> |
toTuple() |
public static <L,M,R> Triple<L,M,R> of(L l, M m, R r)
L
- M
- R
- l
- m
- r
- public L getLeft()
public void setLeft(L left)
left
- the new leftpublic M getMiddle()
public void setMiddle(M middle)
middle
- the new middlepublic R getRight()
public void setRight(R right)
right
- the new rightpublic L getAndSetLeft(L newLeft)
newLeft
- public L setAndGetLeft(L newLeft)
newLeft
- public M getAndSetMiddle(M newMiddle)
newMiddle
- public M setAndGetMiddle(M newMiddle)
newMiddle
- public R getAndSetRight(R newRight)
newRight
- public R setAndGetRight(R newRight)
newRight
- public <E extends Exception> boolean setLeftIf(L newLeft, Throwables.BiPredicate<? super Triple<L,M,R>,? super L,E> predicate) throws E extends Exception
newLeft
and returns true
if predicate
returns true. Otherwise returns
false
without setting the value to new value.E
- newLeft
- predicate
- - the first parameter is current pair, the second
parameter is the newLeft
E
- the eE extends Exception
public <E extends Exception> boolean setMiddleIf(M newMiddle, Throwables.BiPredicate<? super Triple<L,M,R>,? super M,E> predicate) throws E extends Exception
newMiddle
and returns true
if predicate
returns true. Otherwise returns
false
without setting the value to new value.E
- newMiddle
- predicate
- - the first parameter is current pair, the second
parameter is the newMiddle
E
- the eE extends Exception
public <E extends Exception> boolean setRightIf(R newRight, Throwables.BiPredicate<? super Triple<L,M,R>,? super R,E> predicate) throws E extends Exception
newRight
and returns true
if predicate
returns true. Otherwise returns
false
without setting the value to new value.E
- newRight
- predicate
- - the first parameter is current pair, the second
parameter is the newRight
E
- the eE extends Exception
public <E extends Exception> boolean setIf(L newLeft, M newMiddle, R newRight, Throwables.QuadPredicate<? super Triple<L,M,R>,? super L,? super M,? super R,E> predicate) throws E extends Exception
newLeft
and newRight
and
returns true
if predicate
returns true.
Otherwise returns false
without setting the left/right to
new values.E
- newLeft
- newMiddle
- newRight
- predicate
- - the first parameter is current pair, the second
parameter is the newLeft
, the third parameter is the
newMiddle
, the fourth parameter is the
newRight
E
- the eE extends Exception
@Beta public Triple<R,M,L> reverse()
public Object[] toArray()
public <A> A[] toArray(A[] a)
A
- a
- public <E extends Exception> void forEach(Throwables.Consumer<?,E> comsumer) throws E extends Exception
E
- comsumer
- E
- the eE extends Exception
public <E extends Exception> void accept(Throwables.TriConsumer<? super L,? super M,? super R,E> action) throws E extends Exception
E
- action
- E
- the eE extends Exception
public <E extends Exception> void accept(Throwables.Consumer<? super Triple<L,M,R>,E> action) throws E extends Exception
E
- action
- E
- the eE extends Exception
public <U,E extends Exception> U map(Throwables.TriFunction<? super L,? super M,? super R,U,E> mapper) throws E extends Exception
U
- E
- mapper
- E
- the eE extends Exception
public <U,E extends Exception> U map(Throwables.Function<? super Triple<L,M,R>,U,E> mapper) throws E extends Exception
U
- E
- mapper
- E
- the eE extends Exception
public <E extends Exception> u.Optional<Triple<L,M,R>> filter(Throwables.TriPredicate<? super L,? super M,? super R,E> predicate) throws E extends Exception
E
- predicate
- E
- the eE extends Exception
public <E extends Exception> u.Optional<Triple<L,M,R>> filter(Throwables.Predicate<? super Triple<L,M,R>,E> predicate) throws E extends Exception
E
- predicate
- E
- the eE extends Exception
public <T,E extends Exception> Stream<T> stream(Throwables.Function<? super Triple<L,M,R>,Stream<T>,E> func) throws E extends Exception
E extends Exception
public u.Optional<Triple<L,M,R>> toOptional()
public Tuple.Tuple3<L,M,R> toTuple()
public boolean equals(Object obj)
Copyright © 2020. All rights reserved.