T
- the self-type of units enumpublic interface IStatechartState<A extends Agent,T extends java.lang.Enum<T> & IStatechartState<A,T>>
Modifier and Type | Method and Description |
---|---|
default java.util.Collection<T> |
calculateAllSimpleStatesDeep() |
default java.util.Set<T> |
calculateFullState() |
default java.util.Set<T> |
calculateStatesInside() |
default boolean |
containsState(T simpleState)
Checks if this state of a statechart is composite and it contains another
(deep contents - inside contained composite states - are also checked).
|
default T |
getContainerState()
Returns the immediate container state of this state or
null if this state
is at the topmost level (has no container state). |
java.util.Set<T> |
getFullState()
Returns the unordered set containing this state and all (if any) composite states containing this state.
|
java.util.Collection<T> |
getSimpleStatesDeep()
Returns collection of all simple states inside this state.
|
Statechart<T> |
getStatechart(A agent)
Returns statechart from the given agent which owns this state.
|
java.util.Set<T> |
getStatesInside()
Returns unordered set of all, simple & composite, states inside this state.
|
default boolean |
inState(Agent agent) |
default boolean |
isSimpleState()
Returns
true if this state is a simple (not composite) state |
java.lang.String |
name()
Returns the name of a statechart state.
|
int |
ordinal()
Returns the ordinal number of this state in the statechart (states are numbered in some deterministic order)
|
java.lang.String name()
default boolean containsState(T simpleState)
simpleState
- the (possibly) simple statetrue
if this
contains simpleState
default boolean isSimpleState()
true
if this state is a simple (not composite) statedefault T getContainerState()
null
if this state
is at the topmost level (has no container state).state
- the state whose immediate container is being looked fornull
@AnyLogicInternalAPI @AnyLogicInternalCodegenAPI java.util.Collection<T> getSimpleStatesDeep()
return simpleStates;
where the field
is initialized in constructor: simpleStates = calculateAllSimpleStatesDeep();
@AnyLogicInternalCodegenAPI default java.util.Collection<T> calculateAllSimpleStatesDeep()
java.util.Set<T> getStatesInside()
@AnyLogicInternalCodegenAPI default java.util.Set<T> calculateStatesInside()
java.util.Set<T> getFullState()
return fullState;
where the field
is initialized lazily: fullState = calculateFullState();
@AnyLogicInternalCodegenAPI default java.util.Set<T> calculateFullState()
int ordinal()
Enum.ordinal()
@AnyLogicInternalCodegenAPI Statechart<T> getStatechart(A agent)
null
if the agent has no statechart with this stateagent
- statechart ownernull
@AnyLogicInternalAPI default boolean inState(Agent agent)
Copyright © AnyLogic North America, LLC. All Rights Reserved.