public abstract class Functions extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Functions.MemoizedBiFunction<A,B,C> |
Modifier and Type | Field and Description |
---|---|
static Function<Object,Integer> |
hashCode
Deprecated.
|
static Function<Object,String> |
toString
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static <A,B> Function<A,B> |
adjust(Function<? super A,? extends B> f) |
static <A> Function<Iterable<? extends A>,A> |
arbitrary() |
static <A> Semigroup<A> |
asSemigroup(BiFunction<? super A,? super A,? extends A> f) |
static <A,B,C> BiFunction<A,B,C> |
binConstant(C result) |
static <A,B> Function<A,B> |
cast(Class<? extends B> cls) |
static <A,B,C> BiFunction<Function<? super A,? extends B>,Function<? super B,? extends C>,Function<A,C>> |
compose() |
static <A,B,C,D> BiFunction<A,B,D> |
compose(BiFunction<? super A,? super B,? extends C> f,
Function<? super C,? extends D> g) |
static <A,B,C> Function<A,C> |
compose(Function<? super A,? extends B> inner,
Function<? super B,? extends C> outer) |
static <A,B,C,D> Function<A,D> |
compose(Function<? super A,? extends B> f1,
Function<? super B,? extends C> f2,
Function<? super C,? extends D> f3) |
static <A,B,C,D,E> |
compose(Function<? super A,? extends B> f1,
Function<? super B,? extends C> f2,
Function<? super C,? extends D> f3,
Function<? super D,? extends E> f4) |
static <A,B,C,D,E> |
compose(Function<? super A,? extends B> f,
Function<? super C,? extends D> g,
BiFunction<? super B,? super D,? extends E> h) |
static <A,B,C> InvertibleFunction<A,C> |
compose(InvertibleFunction<A,B> inner,
InvertibleFunction<B,C> outer) |
static <A,B,C> RetractableFunction<A,C> |
compose(RetractableFunction<A,B> inner,
RetractableFunction<B,C> outer) |
static <A,B,C> SectionableFunction<A,C> |
compose(SectionableFunction<A,B> inner,
SectionableFunction<B,C> outer) |
static <A,B> Function<A,B> |
constant(B result) |
static <A,B,C> Function<A,Function<B,C>> |
curry(BiFunction<A,B,C> f) |
static <A,B> Function<A,B> |
defaultTo(B def,
Function<? super A,? extends B> fun) |
static <A,B> Predicate<A> |
domain(Function<? super A,? extends B> fun) |
static <A,B> Function<A,B> |
fail() |
static <A,B,C> BiFunction<B,A,C> |
flip(BiFunction<A,B,C> f) |
static <A,B> Function<A,B> |
get(Map<? super A,? extends B> map) |
static <A> Function<A,Class<? extends A>> |
getClassF()
Deprecated.
|
static <A> InvertibleFunction<A,A> |
identity() |
static <A> InvertibleFunction<A,A> |
identity(Class<A> cls) |
static <A,B> InvertibleFunction<B,A> |
inverse(InvertibleFunction<A,B> fun) |
static <A,B> SectionableFunction<B,A> |
inverse(RetractableFunction<A,B> fun) |
static <A,B> RetractableFunction<B,A> |
inverse(SectionableFunction<A,B> fun) |
static <A,B,C> Function<A,C> |
leftSection(BiFunction<? super A,? super B,? extends C> f,
B arg) |
static <A,B,C> Functions.MemoizedBiFunction<A,B,C> |
memoize(BiFunction<A,B,C> fun) |
static <A,B> Function<A,B> |
memoize(Function<A,B> fun) |
static <A,B> Function<A,B> |
override(Function<? super A,? extends B> first,
Function<? super A,? extends B> second) |
static <A,B> Function<A,B> |
restrict(Function<? super A,? extends B> fun,
Predicate<? super A> cond) |
static <A,B,C> Function<B,C> |
rightSection(BiFunction<? super A,? super B,? extends C> f,
A a) |
static <A,B> Function<A,B> |
strict(Function<A,B> fun) |
static <A> Function<A,A> |
trace(String label) |
static <A,B,C> BiFunction<A,B,C> |
uncurry(Function<A,Function<B,C>> f) |
static <A,B> Function<A,B> |
undef(String n) |
@Deprecated public static final Function<Object,String> toString
@Deprecated public static final Function<Object,Integer> hashCode
public static <A> InvertibleFunction<A,A> identity()
public static <A> InvertibleFunction<A,A> identity(Class<A> cls)
public static <A,B,C> Function<A,C> compose(Function<? super A,? extends B> inner, Function<? super B,? extends C> outer)
public static <A,B,C> RetractableFunction<A,C> compose(RetractableFunction<A,B> inner, RetractableFunction<B,C> outer)
public static <A,B,C> SectionableFunction<A,C> compose(SectionableFunction<A,B> inner, SectionableFunction<B,C> outer)
public static <A,B,C> InvertibleFunction<A,C> compose(InvertibleFunction<A,B> inner, InvertibleFunction<B,C> outer)
public static <A,B,C> BiFunction<Function<? super A,? extends B>,Function<? super B,? extends C>,Function<A,C>> compose()
public static <A,B,C> Function<A,Function<B,C>> curry(BiFunction<A,B,C> f)
public static <A,B,C> BiFunction<A,B,C> uncurry(Function<A,Function<B,C>> f)
public static <A,B> Function<A,B> constant(B result)
public static <A,B,C> BiFunction<A,B,C> binConstant(C result)
public static <A,B,C> BiFunction<B,A,C> flip(BiFunction<A,B,C> f)
public static <A,B,C> Function<B,C> rightSection(BiFunction<? super A,? super B,? extends C> f, A a)
public static <A,B,C> Function<A,C> leftSection(BiFunction<? super A,? super B,? extends C> f, B arg)
public static <A,B,C,D> BiFunction<A,B,D> compose(BiFunction<? super A,? super B,? extends C> f, Function<? super C,? extends D> g)
public static <A,B,C,D,E> BiFunction<A,C,E> compose(Function<? super A,? extends B> f, Function<? super C,? extends D> g, BiFunction<? super B,? super D,? extends E> h)
public static <A,B> Function<A,B> fail()
public static <A,B> Function<A,B> restrict(Function<? super A,? extends B> fun, Predicate<? super A> cond)
public static <A,B> Function<A,B> override(Function<? super A,? extends B> first, Function<? super A,? extends B> second)
@Deprecated public static <A> Function<A,Class<? extends A>> getClassF()
public static <A,B,C,D> Function<A,D> compose(Function<? super A,? extends B> f1, Function<? super B,? extends C> f2, Function<? super C,? extends D> f3)
public static <A,B,C,D,E> Function<A,E> compose(Function<? super A,? extends B> f1, Function<? super B,? extends C> f2, Function<? super C,? extends D> f3, Function<? super D,? extends E> f4)
public static <A> Semigroup<A> asSemigroup(BiFunction<? super A,? super A,? extends A> f)
public static <A,B> SectionableFunction<B,A> inverse(RetractableFunction<A,B> fun)
public static <A,B> RetractableFunction<B,A> inverse(SectionableFunction<A,B> fun)
public static <A,B> InvertibleFunction<B,A> inverse(InvertibleFunction<A,B> fun)
public static <A,B,C> Functions.MemoizedBiFunction<A,B,C> memoize(BiFunction<A,B,C> fun)
see also the complete user documentation .