public class Functions extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> Function<T,Boolean> |
complement(Predicate<? super T> f)
Returns a function that return false if supplied returns true, and true is supplied returns false
|
static <A,B,V> Function<A,V> |
compose(Function<? super A,? extends B> f1,
Function<? super B,? extends V> f2)
Returns a composed function that first applies f1 to its input, and then f2 to the result..
|
static <T,U,V> Function<U,V> |
function(BiFunction<? super T,? super U,? extends V> f,
T t)
Produces a Function of a BiFunction by supplying the first argument
|
static <V,U extends V> |
identity()
returns the identity function, which returns the argument applied
|
static <T,V> Supplier<V> |
supplier(Function<? super T,? extends V> f,
T t)
produces a supplier by applying the argument to a functions, without calling the function.
|
public static <T,V> Supplier<V> supplier(Function<? super T,? extends V> f, T t)
Example:
public static <T,U,V> Function<U,V> function(BiFunction<? super T,? super U,? extends V> f, T t)
public static <T> Function<T,Boolean> complement(Predicate<? super T> f)
public static <V,U extends V> Function<U,V> identity()
Copyright © 2017. All rights reserved.