public abstract class Compositions extends Object
| Constructor and Description |
|---|
Compositions() |
| Modifier and Type | Method and Description |
|---|---|
static <T2,T1,R> Function<T1,R> |
compose(Function<T2,R> f,
Function<T1,T2> g)
Composes a function with another function.
|
static <T1,T2,T3,R> |
compose(Function<T3,R> unary,
BiFunction<T1,T2,T3> binary)
Composes a function with a binary function.
|
static <T1,T2,T3,R> |
compose(Function<T3,R> f,
Function<T2,T3> g,
Function<T1,T2> h)
Composes three functions.
|
static <T1,T2,T3,T4,R> |
compose(Function<T4,R> unary,
TriFunction<T1,T2,T3,T4> ternary)
Composes a function with a ternary function.
|
static <T,R> Supplier<R> |
compose(Function<T,R> f,
Supplier<T> g)
Composes a function with a supplier (function ° supplier).
|
static <T> UnaryOperator<T> |
compose(Iterator<Function<T,T>> endodelegates)
Composes an iterator of endofunctions.
|
static <R,T1,T2> BiPredicate<T1,T2> |
compose(Predicate<R> predicate,
BiFunction<T1,T2,R> function)
Composes a predicate with a binary function (predicate ° function).
|
static <T,R> Predicate<T> |
compose(Predicate<R> predicate,
Function<T,R> function)
Composes a predicate with a function (predicate ° function).
|
static <T1,T2,T3,R> |
compose(Predicate<R> predicate,
TriFunction<T1,T2,T3,R> function)
Composes a predicate with a ternary function (predicate ° function).
|
public static <T,R> Supplier<R> compose(Function<T,R> f, Supplier<T> g)
T - the function and supplier parameter typeR - the function return typef - the function to be composedg - the supplier to be composedpublic static <T2,T1,R> Function<T1,R> compose(Function<T2,R> f, Function<T1,T2> g)
T2 - f parameter type and g return typeT1 - g parameter typeR - f return typef - the first function to be composedg - the second function to be composedpublic static <T1,T2,T3,R> Function<T1,R> compose(Function<T3,R> f, Function<T2,T3> g, Function<T1,T2> h)
T1 - the third function parameter typeT2 - the second function parameter type, the third function result typeT3 - the first function parameter type, the second function result typeR - the first function result typef - the first function to be composedg - the second function to be composedh - the third function to be composedpublic static <T1,T2,T3,R> BiFunction<T1,T2,R> compose(Function<T3,R> unary, BiFunction<T1,T2,T3> binary)
T1 - the first binary parameter typeT2 - the second binary parameter typeT3 - unary parameter type and binary return typeR - unary return typeunary - the function to be composedbinary - the binary function to be composedpublic static <T1,T2,T3,T4,R> TriFunction<T1,T2,T3,R> compose(Function<T4,R> unary, TriFunction<T1,T2,T3,T4> ternary)
T1 - the first ternary parameter typeT2 - the second ternary parameter typeT3 - the third ternary parameter typeT4 - unary parameter type and ternary return typeR - unary return typeunary - the unary function to be composedternary - the ternary function to be composedpublic static <T,R> Predicate<T> compose(Predicate<R> predicate, Function<T,R> function)
T - the function parameter typeR - the predicate parameter type, the function result typepredicate - the predicate to be composedfunction - the function to be composedpublic static <R,T1,T2> BiPredicate<T1,T2> compose(Predicate<R> predicate, BiFunction<T1,T2,R> function)
R - the predicate parameter typeT1 - the function first parameter typeT2 - the function second parameter typepredicate - the predicate to be composedfunction - the function to be composedpublic static <T1,T2,T3,R> TriPredicate<T1,T2,T3> compose(Predicate<R> predicate, TriFunction<T1,T2,T3,R> function)
T1 - the function first typeT2 - the function second typeT3 - the function third typeR - the function result type and the predicate typepredicate - the predicate to be composedfunction - the function to be composedpublic static <T> UnaryOperator<T> compose(Iterator<Function<T,T>> endodelegates)
T - the functions parameter and result typeendodelegates - to be composed (e.g: f,g,h)Copyright © 2017. All rights reserved.