public class Functional extends Object
| Constructor and Description |
|---|
Functional() |
| Modifier and Type | Method and Description |
|---|---|
static <A,B,C> Function<A,C> |
compose(Function<B,C> g,
Function<A,B> f)
Function composition as a static method which is more convenient than casting a lambda
and calling
Function.compose(Function). |
static <K,V> Consumer<Map.Entry<K,V>> |
mapEntryBiConsumer(BiConsumer<K,V> consumer)
Transform a BiConsumer to accept
Map.Entry |
static <K,V,R> Function<Map.Entry<K,V>,R> |
mapEntryBiFunction(BiFunction<K,V,R> mapper)
Transform a BiFunction to operate over a
Map.Entry |
static <T> Predicate<T> |
negate(Predicate<T> p)
Predicate negation as a static method which is more convenient than casting a lambda
and calling
Predicate.negate(). |
static <T> BinaryOperator<T> |
throwingCombiner()
A binary operator to be used with non-parallel
Stream.reduce(Object, BiFunction, BinaryOperator)
calls when a combiner is not needed. |
static <T> UnaryOperator<T> |
wrapPartialWithIdentity(UnaryOperator<T> partialFunction)
Transform partial function to a total function by falling back to identity when the
input is not mapped.
|
public static <K,V,R> Function<Map.Entry<K,V>,R> mapEntryBiFunction(BiFunction<K,V,R> mapper)
Map.Entrypublic static <K,V> Consumer<Map.Entry<K,V>> mapEntryBiConsumer(BiConsumer<K,V> consumer)
Map.Entrypublic static <T> UnaryOperator<T> wrapPartialWithIdentity(UnaryOperator<T> partialFunction)
public static <A,B,C> Function<A,C> compose(Function<B,C> g, Function<A,B> f)
Function.compose(Function).public static <T> Predicate<T> negate(Predicate<T> p)
Predicate.negate().public static <T> BinaryOperator<T> throwingCombiner()
Stream.reduce(Object, BiFunction, BinaryOperator)
calls when a combiner is not needed.Copyright © 2010-2016 Stardog Union. All Rights Reserved.