| Package | Description |
|---|---|
| com.codepoetics.protonpack.stateful |
| Modifier and Type | Method and Description |
|---|---|
Transition<Boolean,Void> |
TerminatingActionStateMachine.apply(Boolean shouldContinue,
T item) |
Transition<Set<T>,T> |
SubsetCheckingStateMachine.apply(Set<T> state,
T element) |
Transition<S,O> |
StateMachine.apply(S state,
I input)
Apply the given input to the given state, returning a transition to a new state with 0 or more outputs.
|
Transition<S,O> |
ComposedStateMachine.apply(S state,
I input) |
Transition<S,TaggedValue<S,T>> |
TaggingStateMachine.apply(S state,
T input) |
Transition<java.util.function.Supplier<java.util.stream.Stream<T>>,T> |
LastMatchingFinderStateMachine.apply(java.util.function.Supplier<java.util.stream.Stream<T>> state,
T item) |
Transition<com.codepoetics.protonpack.stateful.Window<T>,R> |
WindowingStateMachine.apply(com.codepoetics.protonpack.stateful.Window<T> window,
T item) |
static <S,O> Transition<S,O> |
Transition.to(S newState,
O... outputs)
Create a transition to a new state with zero or more outputs.
|
static <S,O> Transition<S,O> |
Transition.to(S newState,
java.util.stream.Stream<O> outputs)
Create a transition to a new state with the given outputs.
|
| Modifier and Type | Method and Description |
|---|---|
static <S,I,O> StateMachine<S,I,O> |
StateMachine.create(java.util.function.Supplier<S> initialState,
java.util.function.BiFunction<S,I,Transition<S,O>> transitionFunction)
Use the given transition function to create a state machine that never terminates, and releases no final outputs at the end of processing.
|
static <S,I,O> StateMachine<S,I,O> |
StateMachine.create(java.util.function.Supplier<S> initialState,
java.util.function.BiFunction<S,I,Transition<S,O>> transitionFunction,
java.util.function.Predicate<S> isTerminal)
Use the given transition function to create a state machine that terminates if the terminating condition is met, but releases no final outputs at the end of processing.
|
static <S,I,O> StateMachine<S,I,O> |
StateMachine.create(java.util.function.Supplier<S> initialState,
java.util.function.BiFunction<S,I,Transition<S,O>> transitionFunction,
java.util.function.Predicate<S> isTerminal,
java.util.function.Function<S,java.util.stream.Stream<O>> finisher)
Use the given transition function to create a state machine that terminates if the terminating condition is met, and may release final outputs at the end of processing.
|
Copyright © 2020. All rights reserved.