public abstract class Dispatching extends Object
| Constructor and Description |
|---|
Dispatching() |
| Modifier and Type | Method and Description |
|---|---|
static <T1,T2,R> BiConsumer<T1,T2> |
consumer(BiFunction<T1,T2,R> function)
Adapts a binary function to a binary consumer.
|
static <T,R> Consumer<T> |
consumer(Function<T,R> function)
Adapts a function to an consumer.
|
static <T1,T2,T3,R> |
consumer(TriFunction<T1,T2,T3,R> function)
Adapts a ternary function to a ternary consumer.
|
static <T1,T2> Consumer<T2> |
curry(BiConsumer<T1,T2> consumer,
T1 first)
Partial application of the first parameter to a binary consumer.
|
static <T1,T2,R> Function<T2,R> |
curry(BiFunction<T1,T2,R> function,
T1 first)
Partial application of the first parameter to a binary function.
|
static <T1,T2> Predicate<T2> |
curry(BiPredicate<T1,T2> predicate,
T1 first)
Partial application of the first parameter to a binary predicate.
|
static <T> Runnable |
curry(Consumer<T> consumer,
T value)
Partial application of the first parameter to an consumer.
|
static <T,R> Supplier<R> |
curry(Function<T,R> function,
T value)
Partial application of the parameter to a function.
|
static <T> BooleanSupplier |
curry(Predicate<T> predicate,
T value)
Partial application of the parameter to a predicate.
|
static <T1,T2,T3> BiConsumer<T2,T3> |
curry(TriConsumer<T1,T2,T3> consumer,
T1 first)
Partial application of the first parameter to a ternary consumer.
|
static <T1,T2,T3,R> |
curry(TriFunction<T1,T2,T3,R> function,
T1 first)
Partial application of the first parameter to a ternary function.
|
static <T1,T2,T3> BiPredicate<T2,T3> |
curry(TriPredicate<T1,T2,T3> predicate,
T1 first)
Partial application of the first parameter to a ternary predicate.
|
static <T1,T2> BiFunction<T1,T2,Void> |
function(BiConsumer<T1,T2> adaptee)
Adapts a binary consumer to a binary function.
|
static <T1,T2> BiFunction<T1,T2,Boolean> |
function(BiPredicate<T1,T2> adaptee)
Adapts a binary predicate to a binary function.
|
static <T> Function<T,Void> |
function(Consumer<T> adaptee)
Adapts an consumer to a function.
|
static <T> Function<T,Boolean> |
function(Predicate<T> adaptee)
Adapts a predicate to a function.
|
static <T1,T2,T3> TriFunction<T1,T2,T3,Void> |
function(TriConsumer<T1,T2,T3> adaptee)
Adapts a ternary consumer to a ternary function.
|
static <T1,T2,T3> TriFunction<T1,T2,T3,Boolean> |
function(TriPredicate<T1,T2,T3> adaptee)
Adapts a ternary predicate to a ternary function.
|
static <T> Predicate<T> |
ignore(BooleanSupplier proposition,
Class<T> ignored)
Adapts a proposition to a predicate by ignoring the passed parameter.
|
static <T> Consumer<T> |
ignore(Runnable runnable,
Class<T> ignored)
Adapts a runnable to an consumer by ignoring the parameter.
|
static <T,R> Function<T,R> |
ignore(Supplier<R> supplier,
Class<T> ignored)
Adapts a supplier to a function by ignoring the passed parameter.
|
static <T1,T2,T3> TriConsumer<T1,T2,T3> |
ignore1st(BiConsumer<T2,T3> consumer,
Class<T1> ignored)
Adapts a binary consumer to a ternary consumer by ignoring the first
parameter.
|
static <T1,T2,T3,R> |
ignore1st(BiFunction<T2,T3,R> function,
Class<T1> ignored)
Adapts a binary function to a ternary function by ignoring the first
parameter.
|
static <T1,T2,T3> TriPredicate<T1,T2,T3> |
ignore1st(BiPredicate<T2,T3> predicate,
Class<T1> ignored)
Adapts a binary predicate to a ternary predicate by ignoring first
parameter.
|
static <T1,T2> BiConsumer<T1,T2> |
ignore1st(Consumer<T2> consumer,
Class<T1> ignored)
Adapts an consumer to a binary consumer by ignoring the first parameter.
|
static <T1,T2,R> BiFunction<T1,T2,R> |
ignore1st(Function<T2,R> function,
Class<T1> ignored)
Adapts a function to a binary function by ignoring the first parameter.
|
static <T1,T2> BiPredicate<T1,T2> |
ignore1st(Predicate<T2> predicate,
Class<T1> ignored)
Adapts a predicate to a binary predicate by ignoring first parameter.
|
static <T1,T2,T3> TriConsumer<T1,T2,T3> |
ignore2nd(BiConsumer<T1,T3> consumer,
Class<T2> ignored)
Adapts a binary consumer to a ternary consumer by ignoring the second
parameter.
|
static <T1,T2,T3,R> |
ignore2nd(BiFunction<T1,T3,R> function,
Class<T2> ignored)
Adapts a binary function to a ternary function by ignoring the second
parameter.
|
static <T1,T2,T3> TriPredicate<T1,T2,T3> |
ignore2nd(BiPredicate<T1,T3> predicate,
Class<T2> ignored)
Adapts a binary predicate to a ternary predicate by ignoring second
parameter.
|
static <T1,T2> BiConsumer<T1,T2> |
ignore2nd(Consumer<T1> consumer,
Class<T2> ignored)
Adapts an consumer to a binary consumer by ignoring the second parameter.
|
static <T1,T2,R> BiFunction<T1,T2,R> |
ignore2nd(Function<T1,R> function,
Class<T2> ignored)
Adapts a function to a binary function by ignoring the second parameter.
|
static <T1,T2> BiPredicate<T1,T2> |
ignore2nd(Predicate<T1> predicate,
Class<T2> ignored)
Adapts a predicate to a binary predicate by ignoring second parameter.
|
static <T1,T2,T3> TriConsumer<T1,T2,T3> |
ignore3rd(BiConsumer<T1,T2> consumer,
Class<T3> ignored)
Adapts a binary consumer to a ternary consumer by ignoring the third
parameter.
|
static <T1,T2,T3,R> |
ignore3rd(BiFunction<T1,T2,R> function,
Class<T3> ignored)
Adapts a binary function to a ternary function by ignoring the third
parameter.
|
static <T1,T2,T3> TriPredicate<T1,T2,T3> |
ignore3rd(BiPredicate<T1,T2> predicate,
Class<T3> ignored)
Adapts a binary predicate to a ternary predicate by ignoring third
parameter.
|
static <T1,T2,T3> BiConsumer<T1,T3> |
mcurry(TriConsumer<T1,T2,T3> consumer,
T2 second)
Partial application of the second (middle) parameter to a ternary
consumer.
|
static <T1,T2,T3,R> |
mcurry(TriFunction<T1,T2,T3,R> function,
T2 second)
Partial application of the second (middle) parameter to a ternary
function.
|
static <T1,T2,T3> BiPredicate<T1,T3> |
mcurry(TriPredicate<T1,T2,T3> predicate,
T2 second)
Partial application of the second (middle) parameter to a ternary
predicate.
|
static <T1,T2> BiPredicate<T1,T2> |
predicate(BiFunction<T1,T2,Boolean> function)
Adapts a binary function to a binary predicate
|
static <T> Predicate<T> |
predicate(Function<T,Boolean> function)
Adapts a function to a predicate.
|
static <T1,T2,T3> TriPredicate<T1,T2,T3> |
predicate(TriFunction<T1,T2,T3,Boolean> function)
Adapts a ternary function to a ternary predicate.
|
static BooleanSupplier |
proposition(Supplier<Boolean> supplier)
Adapts a supplier to a proposition.
|
static <T1,T2> Consumer<T1> |
rcurry(BiConsumer<T1,T2> consumer,
T2 second)
Partial application of the last (rightmost) parameter to a binary
consumer.
|
static <T1,T2,R> Function<T1,R> |
rcurry(BiFunction<T1,T2,R> function,
T2 second)
Partial application of the last (rightmost) parameter to a binary
function.
|
static <T1,T2> Predicate<T1> |
rcurry(BiPredicate<T1,T2> predicate,
T2 second)
Partial application of the last (rightmost) parameter to a binary
predicate.
|
static <T1,T2,T3> BiConsumer<T1,T2> |
rcurry(TriConsumer<T1,T2,T3> consumer,
T3 third)
Partial application of the last (rightmost) parameter to a ternary
consumer.
|
static <T1,T2,T3,R> |
rcurry(TriFunction<T1,T2,T3,R> function,
T3 third)
Partial application of the last (rightmost) parameter to a ternary
function.
|
static <T1,T2,T3> BiPredicate<T1,T2> |
rcurry(TriPredicate<T1,T2,T3> predicate,
T3 third)
Partial application of the last (rightmost) parameter to a ternary
predicate.
|
static <T> Runnable |
runnable(Supplier<T> supplier)
Adapts a supplier to a runnable.
|
static Supplier<Boolean> |
supplier(BooleanSupplier adaptee)
Adapts a proposition to a supplier.
|
static <T> Supplier<Optional<T>> |
supplier(Iterator<T> adaptee)
Adapts an iterator to a supplier.
|
static Supplier<Void> |
supplier(Runnable adaptee)
Adapts a runnable to a supplier.
|
public static <T> Runnable curry(Consumer<T> consumer, T value)
T - the consumer parameter typeconsumer - the consumer to be curriedvalue - the value to be curriedpublic static <T1,T2> Consumer<T2> curry(BiConsumer<T1,T2> consumer, T1 first)
T1 - the consumer former parameter typeT2 - the consumer latter parameter typeconsumer - the binary consumer to be curriedfirst - the value to be curried as first parameterpublic static <T1,T2,T3> BiConsumer<T2,T3> curry(TriConsumer<T1,T2,T3> consumer, T1 first)
T1 - the consumer first parameter typeT2 - the consumer second parameter typeT3 - the consumer third parameter typeconsumer - the ternary consumer to be curried as first parameterfirst - the value to be curriedpublic static <T> BooleanSupplier curry(Predicate<T> predicate, T value)
T - the predicate parameter typepredicate - the predicate to be curriedvalue - the value to be curriedpublic static <T1,T2> Predicate<T2> curry(BiPredicate<T1,T2> predicate, T1 first)
T1 - the predicate former parameter typeT2 - the predicate latter parameter typepredicate - the predicate to be curriedfirst - the value to be curried as first parameterpublic static <T1,T2,T3> BiPredicate<T2,T3> curry(TriPredicate<T1,T2,T3> predicate, T1 first)
T1 - the predicate first parameter typeT2 - the predicate second parameter typeT3 - the predicate third parameter typepredicate - the predicate to be curriedfirst - the value to be curried as first parameterpublic static <T,R> Supplier<R> curry(Function<T,R> function, T value)
T - the function parameter typeR - the function return typefunction - the function to be curriedvalue - the value to be curriedpublic static <T1,T2,R> Function<T2,R> curry(BiFunction<T1,T2,R> function, T1 first)
T1 - the function first parameter typeT2 - the function second parameter typeR - the function return typefunction - the function to be curriedfirst - the value to be curried as first parameterpublic static <T1,T2,T3,R> BiFunction<T2,T3,R> curry(TriFunction<T1,T2,T3,R> function, T1 first)
T1 - the function first parameter typeT2 - the function second parameter typeT3 - the function third parameter typeR - the function return typefunction - the function to be curriedfirst - the value to be curried as first parameterpublic static <T1,T2,T3> BiConsumer<T1,T3> mcurry(TriConsumer<T1,T2,T3> consumer, T2 second)
T1 - the consumer first parameter typeT2 - the consumer second parameter typeT3 - the consumer third parameter typeconsumer - the consumer to be curriedsecond - the value to be curried as second parameterpublic static <T1,T2,T3,R> BiFunction<T1,T3,R> mcurry(TriFunction<T1,T2,T3,R> function, T2 second)
T1 - the function first parameter typeT2 - the function second parameter typeT3 - the function third parameter typeR - the function return typefunction - the function to be curriedsecond - the value to be curried as second parameterpublic static <T1,T2,T3> BiPredicate<T1,T3> mcurry(TriPredicate<T1,T2,T3> predicate, T2 second)
T1 - the predicate first parameter typeT2 - the predicate second parameter typeT3 - the predicate third parameter typepredicate - the predicate to be curriedsecond - the value to be curried as second parameterpublic static <T1,T2> Consumer<T1> rcurry(BiConsumer<T1,T2> consumer, T2 second)
T1 - the consumer first parameter typeT2 - the consumer second parameter typeconsumer - the consumer to be curriedsecond - the value to be curried as second parameterpublic static <T1,T2,T3> BiConsumer<T1,T2> rcurry(TriConsumer<T1,T2,T3> consumer, T3 third)
T1 - the consumer first parameter typeT2 - the consumer second parameter typeT3 - the consumer third parameter typeconsumer - the consumer to be curriedthird - the value to be curried as third parameterpublic static <T1,T2> Predicate<T1> rcurry(BiPredicate<T1,T2> predicate, T2 second)
T1 - the predicate first parameter typeT2 - the predicate second parameter typepredicate - the predicate to be curriedsecond - the value to be curried as second parameterpublic static <T1,T2,T3> BiPredicate<T1,T2> rcurry(TriPredicate<T1,T2,T3> predicate, T3 third)
T1 - the predicate first parameter typeT2 - the predicate second parameter typeT3 - the predicate third parameter typepredicate - the predicate to be curriedthird - the value to be curried as third parameterpublic static <T1,T2,R> Function<T1,R> rcurry(BiFunction<T1,T2,R> function, T2 second)
T1 - the function first parameter typeT2 - the function second parameter typeR - the function return typefunction - the function to be curriedsecond - the value to be curried as second parameterpublic static <T1,T2,T3,R> BiFunction<T1,T2,R> rcurry(TriFunction<T1,T2,T3,R> function, T3 third)
T1 - the function first parameter typeT2 - the function second parameter typeT3 - the function third parameter typeR - the function return typefunction - the function to be curriedthird - the value to be curried as third parameterpublic static <T> Predicate<T> ignore(BooleanSupplier proposition, Class<T> ignored)
T - the predicate parameter typeproposition - the proposition to be adaptedignored - the adapted predicate parameter type classpublic static <T1,T2> BiPredicate<T1,T2> ignore1st(Predicate<T2> predicate, Class<T1> ignored)
T1 - the adapted predicate first parameter typeT2 - the adapted predicate second parameter typepredicate - the predicate to be adaptedignored - the adapted predicate ignored parameter type classpublic static <T1,T2,T3> TriPredicate<T1,T2,T3> ignore1st(BiPredicate<T2,T3> predicate, Class<T1> ignored)
T1 - the adapted predicate first parameter typeT2 - the adapted predicate second parameter typeT3 - the adapted predicate third parameter typepredicate - the predicate to be adaptedignored - the adapted predicate ignored parameter type classpublic static <T1,T2> BiPredicate<T1,T2> ignore2nd(Predicate<T1> predicate, Class<T2> ignored)
T1 - the adapted predicate first parameter typeT2 - the adapted predicate second parameter typepredicate - the predicate to be adaptedignored - the adapted predicate ignored parameter type classpublic static <T1,T2,T3> TriPredicate<T1,T2,T3> ignore2nd(BiPredicate<T1,T3> predicate, Class<T2> ignored)
T1 - the adapted predicate first parameter typeT2 - the adapted predicate second parameter typeT3 - the adapted predicate third parameter typepredicate - the predicate to be adaptedignored - the adapted predicate ignored parameter type classpublic static <T1,T2,T3> TriPredicate<T1,T2,T3> ignore3rd(BiPredicate<T1,T2> predicate, Class<T3> ignored)
T1 - the adapted predicate first parameter typeT2 - the adapted predicate second parameter typeT3 - the adapted predicate third parameter typepredicate - the predicate to be adaptedignored - the adapted predicate ignored parameter type classpublic static <T> Consumer<T> ignore(Runnable runnable, Class<T> ignored)
T - the adapted consumer parameter typerunnable - the runnable to be adaptedignored - the adapted consumer ignored parameter type classpublic static <T1,T2> BiConsumer<T1,T2> ignore1st(Consumer<T2> consumer, Class<T1> ignored)
T1 - the adapted consumer first parameter typeT2 - the adapted consumer second parameter typeconsumer - the consumer to be adaptedignored - the adapted consumer ignored parameter type classpublic static <T1,T2,T3> TriConsumer<T1,T2,T3> ignore1st(BiConsumer<T2,T3> consumer, Class<T1> ignored)
T1 - the adapted consumer first parameter typeT2 - the adapted consumer second parameter typeT3 - the adapted consumer third parameter typeconsumer - the consumer to be adaptedignored - the adapted consumer ignored parameter type classpublic static <T1,T2> BiConsumer<T1,T2> ignore2nd(Consumer<T1> consumer, Class<T2> ignored)
T1 - the adapted consumer first parameter typeT2 - the adapted consumer second parameter typeconsumer - the consumer to be adaptedignored - the adapted consumer ignored parameter type classpublic static <T1,T2,T3> TriConsumer<T1,T2,T3> ignore2nd(BiConsumer<T1,T3> consumer, Class<T2> ignored)
T1 - the adapted consumer first parameter typeT2 - the adapted consumer second parameter typeT3 - the adapted consumer third parameter typeconsumer - the consumer to be adaptedignored - the adapted consumer ignored parameter type classpublic static <T1,T2,T3> TriConsumer<T1,T2,T3> ignore3rd(BiConsumer<T1,T2> consumer, Class<T3> ignored)
T1 - the adapted consumer first parameter typeT2 - the adapted consumer second parameter typeT3 - the adapted consumer third parameter typeconsumer - the consumer to be adaptedignored - the adapted consumer ignored parameter type classpublic static <T,R> Function<T,R> ignore(Supplier<R> supplier, Class<T> ignored)
T - the adapted function parameter typeR - the adapted function result typesupplier - the supplier to be adaptedignored - the adapted function ignored parameter type classpublic static <T1,T2,R> BiFunction<T1,T2,R> ignore1st(Function<T2,R> function, Class<T1> ignored)
T1 - the adapted function first parameter typeT2 - the adapted function second parameter typeR - the adapted function result typefunction - the function to be adaptedignored - the adapted function ignored parameter type classpublic static <T1,T2,T3,R> TriFunction<T1,T2,T3,R> ignore1st(BiFunction<T2,T3,R> function, Class<T1> ignored)
T1 - the adapted function first parameter typeT2 - the adapted function second parameter typeT3 - the adapted function third parameter typeR - the adapted function result typefunction - the function to be adaptedignored - the adapted function ignored parameter type classpublic static <T1,T2,R> BiFunction<T1,T2,R> ignore2nd(Function<T1,R> function, Class<T2> ignored)
T1 - the adapted function first parameter typeT2 - the adapted function second parameter typeR - the adapted function result typefunction - the function to be adaptedignored - the adapted function ignored parameter type classpublic static <T1,T2,T3,R> TriFunction<T1,T2,T3,R> ignore2nd(BiFunction<T1,T3,R> function, Class<T2> ignored)
T1 - the adapted function first parameter typeT2 - the adapted function second parameter typeT3 - the adapted function third parameter typeR - the adapted function result typefunction - the function to be adaptedignored - the adapted function ignored parameter type classpublic static <T1,T2,T3,R> TriFunction<T1,T2,T3,R> ignore3rd(BiFunction<T1,T2,R> function, Class<T3> ignored)
T1 - the adapted function first parameter typeT2 - the adapted function second parameter typeT3 - the adapted function third parameter typeR - the adapted function result typefunction - the function to be adaptedignored - the adapted function ignored parameter type classpublic static <T> Supplier<Optional<T>> supplier(Iterator<T> adaptee)
adaptee - the runnable to be adaptedpublic static Supplier<Void> supplier(Runnable adaptee)
adaptee - the runnable to be adaptedpublic static Supplier<Boolean> supplier(BooleanSupplier adaptee)
adaptee - the proposition to be adaptedpublic static <T> Function<T,Void> function(Consumer<T> adaptee)
T - the consumer parameter typeadaptee - the consumer to be adaptedpublic static <T1,T2> BiFunction<T1,T2,Void> function(BiConsumer<T1,T2> adaptee)
T1 - the consumer first parameter typeT2 - the consumer second parameter typeadaptee - the consumer to be adaptedpublic static <T1,T2,T3> TriFunction<T1,T2,T3,Void> function(TriConsumer<T1,T2,T3> adaptee)
T1 - the consumer first parameter typeT2 - the consumer second parameter typeT3 - the consumer third parameter typeadaptee - the consumer to be adaptedpublic static <T> Function<T,Boolean> function(Predicate<T> adaptee)
T - the predicate parameter typeadaptee - the predicate to be adaptedpublic static <T1,T2> BiFunction<T1,T2,Boolean> function(BiPredicate<T1,T2> adaptee)
T1 - the predicate first parameter typeT2 - the predicate second parameter typeadaptee - the predicate to be adaptedpublic static <T1,T2,T3> TriFunction<T1,T2,T3,Boolean> function(TriPredicate<T1,T2,T3> adaptee)
T1 - the predicate first parameter typeT2 - the predicate second parameter typeT3 - the predicate third parameter typeadaptee - the predicate to be adaptedpublic static <T> Runnable runnable(Supplier<T> supplier)
T - the supplier parameter typesupplier - the supplier to be adaptedpublic static <T,R> Consumer<T> consumer(Function<T,R> function)
T - the function parameter typeR - the function return typefunction - the function to be adaptedpublic static <T1,T2,R> BiConsumer<T1,T2> consumer(BiFunction<T1,T2,R> function)
T1 - the function first parameter typeT2 - the function second parameter typeR - the function return typefunction - the function to be adaptedpublic static <T1,T2,T3,R> TriConsumer<T1,T2,T3> consumer(TriFunction<T1,T2,T3,R> function)
R - the function return typeT1 - the function first parameter typeT2 - the function second parameter typeT3 - the function third parameter typefunction - the function to be adaptedpublic static BooleanSupplier proposition(Supplier<Boolean> supplier)
supplier - the supplier to be adaptedpublic static <T> Predicate<T> predicate(Function<T,Boolean> function)
T - the function parameter typefunction - the function to be adaptedpublic static <T1,T2> BiPredicate<T1,T2> predicate(BiFunction<T1,T2,Boolean> function)
T1 - the function first parameter typeT2 - the function second parameter typefunction - the function to be adaptedpublic static <T1,T2,T3> TriPredicate<T1,T2,T3> predicate(TriFunction<T1,T2,T3,Boolean> function)
T1 - the function first parameter typeT2 - the function second parameter typeT3 - the function third parameter typefunction - the function to be adaptedCopyright © 2017. All rights reserved.