public abstract class Statefuls extends Object
Modifier and Type | Method and Description |
---|---|
static <S,A> Function<Stateful<S,A>,Stateful<S,A>> |
jump(S state) |
static <S,A,B> Function<Stateful<S,A>,Stateful<S,B>> |
map(Function<? super A,? extends B> fun) |
static <S,A,B> Function<Stateful<S,A>,Stateful<S,A>> |
produceConsume(BiFunction<? super S,? super A,? extends B> prod,
Consumer<? super B,A> cons) |
static <S,A,B,C,D> |
sequence(Function<Stateful<S,A>,? extends Stateful<S,B>> first,
Function<Stateful<S,A>,? extends Stateful<S,C>> second,
BiFunction<? super B,? super C,? extends D> combine) |
static <S,A> Stateful<S,A> |
stateful(S state,
A value) |
static <S,A> Function<Stateful<S,A>,Stateful<S,A>> |
transit(Function<? super S,? extends S> fun) |
static <S,A> Function<Stateful<S,?>,Stateful<S,A>> |
yield(A value) |
public static <S,A> Stateful<S,A> stateful(S state, A value)
public static <S,A> Function<Stateful<S,A>,Stateful<S,A>> transit(Function<? super S,? extends S> fun)
public static <S,A,B> Function<Stateful<S,A>,Stateful<S,B>> map(Function<? super A,? extends B> fun)
public static <S,A,B,C,D> Function<Stateful<S,A>,Stateful<S,D>> sequence(Function<Stateful<S,A>,? extends Stateful<S,B>> first, Function<Stateful<S,A>,? extends Stateful<S,C>> second, BiFunction<? super B,? super C,? extends D> combine)
public static <S,A,B> Function<Stateful<S,A>,Stateful<S,A>> produceConsume(BiFunction<? super S,? super A,? extends B> prod, Consumer<? super B,A> cons)
see also the complete user documentation .