限定符和类型 | 字段和说明 |
---|---|
protected java.util.function.Consumer<StateTransitionContext<S,E,T>> |
action
具体执行的内容
|
protected java.util.function.Predicate<StateTransitionContext<S,E,T>> |
condition
额外条件,触发后的进一步条件需求
|
protected E |
event
触发事件(触发转换)
|
protected java.util.List<S> |
source
来源状态(即从来哪里来)
|
protected S |
target
目标状态(即到哪里去)
|
构造器和说明 |
---|
StateTransitionDecl() |
限定符和类型 | 方法和说明 |
---|---|
protected void |
check()
检测
|
StateTransitionDecl<S,E,T> |
from(S... source)
来源状态
|
StateTransitionDecl<S,E,T> |
on(E event)
触发事件
|
StateTransitionDecl<S,E,T> |
then(java.util.function.Consumer<StateTransitionContext<S,E,T>> action)
然后执行动作
|
StateTransitionDecl<S,E,T> |
to(S target)
目标状态
|
StateTransitionDecl<S,E,T> |
when(java.util.function.Predicate<StateTransitionContext<S,E,T>> condition)
额外条件
|
protected java.util.function.Predicate<StateTransitionContext<S extends State,E extends Event,T>> condition
protected void check()
public StateTransitionDecl<S,E,T> from(S... source)
public StateTransitionDecl<S,E,T> to(S target)
public StateTransitionDecl<S,E,T> on(E event)
public StateTransitionDecl<S,E,T> when(java.util.function.Predicate<StateTransitionContext<S,E,T>> condition)
public StateTransitionDecl<S,E,T> then(java.util.function.Consumer<StateTransitionContext<S,E,T>> action)