S - state typepublic final class StateMachine<S> extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
StateMachine.Builder<S>
StateMachine builder.
|
| Modifier and Type | Method and Description |
|---|---|
S |
currentState()
Returns the current state.
|
void |
handle(Object event)
Handles an event by performing the a state transition and side-effects associated with the event's type.
|
void |
handle(Object event,
String loggingPrefix)
Handles an event by performing the a state transition and side-effects associated with the event's type.
|
public S currentState()
public void handle(Object event, String loggingPrefix)
event - an eventloggingPrefix - a prefix to prepend to the beginning of log linespublic void handle(Object event)
event - an eventCopyright © 2013–2018 Hotels.com. All rights reserved.