org.flexiblepower.efi.util
T - The value stored in this RunningMode (depends on where the RunningMode is being used)public class RunningMode<T> extends java.lang.Object
| Constructor and Description |
|---|
RunningMode(int id,
java.lang.String name,
T value,
java.util.Set<Transition> possibleTransitions)
Construct a new, immutable
RunningMode object. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
int |
getId() |
java.lang.String |
getName() |
java.util.Collection<Transition> |
getTransitions() |
Transition |
getTransitionTo(int runningModeId) |
Transition |
getTransitionTo(RunningMode<T> runningMode) |
T |
getValue() |
int |
hashCode() |
public RunningMode(int id,
java.lang.String name,
T value,
java.util.Set<Transition> possibleTransitions)
RunningMode object.id - Device-unique identifier for this RunningModename - Human readable name for this RunningModevalue - Value stored in this RunningModepossibleTransitions - Possible transitions from this RunningMode to another. This Set should not be empty, unless
this is the only RunningMode for this Actuator.java.lang.NullPointerException - Thrown when name, value or possibleTransitions is nullpublic int getId()
public java.lang.String getName()
public T getValue()
RunningModepublic java.util.Collection<Transition> getTransitions()
Transition objects that contain constraints for switching from this
RunningMode to another. There may be no transition to this RunningMode (itself).public Transition getTransitionTo(RunningMode<T> runningMode)
runningMode - The running mode to switch toTransition that can be used to move to that RunningMode, or null if that
transition is not possiblepublic Transition getTransitionTo(int runningModeId)
runningModeId - The identifier of the running mode to switch toTransition that can be used to move to the corresponding RunningMode, or
null if that transition is not possiblepublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object