Modifier and Type | Method and Description |
---|---|
AbstractBlaubotDeviceDiscoveryEvent |
createDiscoveryEventForDevice(IBlaubotDevice device,
java.util.List<ConnectionMetaDataDTO> connectionMetaDataList)
Creates the appropriate discovery event from the given State
|
static State |
getStateByStatemachineClass(java.lang.Class<? extends IBlaubotState> stateClass) |
java.lang.Class<? extends IBlaubotState> |
getStateClass() |
boolean |
isStateChangeAllowed(State toState)
Checks if a transition to "toState" is allowed from "this" state.
|
static State |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static State[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final State Free
public static final State Peasant
public static final State Prince
public static final State King
public static final State Stopped
public static State[] values()
for (State c : State.values()) System.out.println(c);
public static State valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic java.lang.Class<? extends IBlaubotState> getStateClass()
public static State getStateByStatemachineClass(java.lang.Class<? extends IBlaubotState> stateClass)
stateClass
- a class that is used by sthe state machinepublic AbstractBlaubotDeviceDiscoveryEvent createDiscoveryEventForDevice(IBlaubotDevice device, java.util.List<ConnectionMetaDataDTO> connectionMetaDataList)
device
- the device associated with this stateconnectionMetaDataList
- the meta data for the acceptors of `device`public boolean isStateChangeAllowed(State toState)
toState
- the state to check