public abstract class Tuples extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Tuples.Pairs
untupled.
|
static class |
Tuples.Triples
untupled.
|
| Constructor and Description |
|---|
Tuples() |
| Modifier and Type | Method and Description |
|---|---|
static <T,U> Consumer<Pair<T,U>> |
tupled(BiConsumer<T,U> consumer)
Adapts a binary consumer to an consumer accepting a pair.
|
static <T,U,R> Function<Pair<T,U>,R> |
tupled(BiFunction<T,U,R> function)
Adapts a binary function to a function accepting a pair.
|
static <T,U> Predicate<Pair<T,U>> |
tupled(BiPredicate<T,U> predicate)
Adapts a binary predicate to a predicate accepting a pair.
|
static <T,U,V> Consumer<Triple<T,U,V>> |
tupled(TriConsumer<T,U,V> consumer)
Adapts a ternary consumer to an consumer accepting a triple.
|
static <T,U,V,R> Function<Triple<T,U,V>,R> |
tupled(TriFunction<T,U,V,R> function)
Adapts a ternary function to a function accepting a triple.
|
static <T,U,V> Predicate<Triple<T,U,V>> |
tupled(TriPredicate<T,U,V> predicate)
Adapts a ternary predicate to a predicate accepting a triple.
|
public static <T,U,R> Function<Pair<T,U>,R> tupled(BiFunction<T,U,R> function)
T - the function first parameter typeU - the function second parameter typeR - the function return typefunction - the function to be adaptedpublic static <T,U> Predicate<Pair<T,U>> tupled(BiPredicate<T,U> predicate)
T - the predicate first parameter typeU - the predicate second parameter typepredicate - the predicate to be adaptedpublic static <T,U> Consumer<Pair<T,U>> tupled(BiConsumer<T,U> consumer)
T - the consumer first parameter typeU - the consumer second parameter typeconsumer - the consumer to be adaptedpublic static <T,U,V,R> Function<Triple<T,U,V>,R> tupled(TriFunction<T,U,V,R> function)
T - the function first parameter typeU - the function second parameter typeV - the function third parameter typeR - the function return typefunction - the function to be adaptedpublic static <T,U,V> Predicate<Triple<T,U,V>> tupled(TriPredicate<T,U,V> predicate)
T - the predicate first parameter typeU - the predicate second parameter typeV - the predicate third parameter typepredicate - the predicate to be adaptedpublic static <T,U,V> Consumer<Triple<T,U,V>> tupled(TriConsumer<T,U,V> consumer)
T - the consumer first parameter typeU - the consumer second parameter typeV - the consumer third parameter typeconsumer - the consumer to be adaptedCopyright © 2017. All rights reserved.