S
- a states type.E
- an events typepublic class StateChangedEvent<S extends java.lang.Enum<S>,E extends java.lang.Enum<E>>
extends java.lang.Object
An event describing a FSM state change.
Modifier and Type | Field and Description |
---|---|
private E |
event |
private S |
newState |
private S |
previousState |
private java.time.LocalDateTime |
timestamp |
Constructor and Description |
---|
StateChangedEvent(S previousState,
E event,
S newState)
Creates a new event.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(@Nullable java.lang.Object obj) |
E |
event()
Returns the event that caused the transition.
|
int |
hashCode() |
S |
newState()
Returns the new state.
|
S |
previousState()
Returns the previous state.
|
java.time.LocalDateTime |
timestamp()
Returns the timestamp of the event.
|
java.lang.String |
toString() |
public S previousState()
Returns the previous state.
public E event()
Returns the event that caused the transition.
public S newState()
Returns the new state.
public java.time.LocalDateTime timestamp()
Returns the timestamp of the event.
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(@Nullable java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object