Package com.landawn.abacus.util
Class Tuple.Tuple2<T1,T2>
- Type Parameters:
T1
-T2
-
- All Implemented Interfaces:
Immutable
The Class Tuple2.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.landawn.abacus.util.Tuple
Tuple.Tuple1<T1>, Tuple.Tuple2<T1,
T2>, Tuple.Tuple3<T1, T2, T3>, Tuple.Tuple4<T1, T2, T3, T4>, Tuple.Tuple5<T1, T2, T3, T4, T5>, Tuple.Tuple6<T1, T2, T3, T4, T5, T6>, Tuple.Tuple7<T1, T2, T3, T4, T5, T6, T7>, Tuple.Tuple8<T1, T2, T3, T4, T5, T6, T7, T8>, Tuple.Tuple9<T1, T2, T3, T4, T5, T6, T7, T8, T9> -
Field Summary
-
Method Summary
Modifier and TypeMethodDescription<E extends Exception>
voidaccept
(Throwables.BiConsumer<? super T1, ? super T2, E> action) boolean
allNull()
boolean
anyNull()
int
arity()
boolean
boolean
<E extends Exception>
u.Optional<Tuple.Tuple2<T1,T2>> filter
(Throwables.BiPredicate<? super T1, ? super T2, E> predicate) <E extends Exception>
voidforEach
(Throwables.Consumer<?, E> consumer) int
hashCode()
<U,
E extends Exception>
Umap
(Throwables.BiFunction<? super T1, ? super T2, U, E> mapper) reverse()
Object[]
toArray()
<A> A[]
toArray
(A[] a) toEntry()
toPair()
toString()
-
Field Details
-
_1
The 1. -
_2
The 2.
-
-
Method Details
-
arity
public int arity()- Specified by:
arity
in classTuple<Tuple.Tuple2<T1,
T2>> - Returns:
-
anyNull
public boolean anyNull()- Specified by:
anyNull
in classTuple<Tuple.Tuple2<T1,
T2>> - Returns:
-
allNull
public boolean allNull()- Specified by:
allNull
in classTuple<Tuple.Tuple2<T1,
T2>> - Returns:
-
contains
- Specified by:
contains
in classTuple<Tuple.Tuple2<T1,
T2>> - Returns:
-
toArray
- Specified by:
toArray
in classTuple<Tuple.Tuple2<T1,
T2>> - Returns:
-
toArray
public <A> A[] toArray(A[] a) - Specified by:
toArray
in classTuple<Tuple.Tuple2<T1,
T2>> - Type Parameters:
A
-- Parameters:
a
-- Returns:
-
toPair
- Returns:
-
toEntry
- Returns:
-
reverse
- Returns:
-
forEach
- Specified by:
forEach
in classTuple<Tuple.Tuple2<T1,
T2>> - Type Parameters:
E
-- Parameters:
consumer
-- Throws:
E
- the e
-
accept
public <E extends Exception> void accept(Throwables.BiConsumer<? super T1, ? super T2, throws EE> action) - Type Parameters:
E
-- Parameters:
action
-- Throws:
E
- the e
-
map
public <U,E extends Exception> U map(Throwables.BiFunction<? super T1, ? super T2, throws EU, E> mapper) - Type Parameters:
U
-E
-- Parameters:
mapper
-- Returns:
- Throws:
E
- the e
-
filter
public <E extends Exception> u.Optional<Tuple.Tuple2<T1,T2>> filter(Throwables.BiPredicate<? super T1, ? super T2, throws EE> predicate) - Type Parameters:
E
-- Parameters:
predicate
-- Returns:
- Throws:
E
- the e
-
hashCode
public int hashCode() -
equals
-
toString
-