org.flexiblepower.efi.util
public class Transition extends java.lang.Object
RunningMode
to another.Modifier and Type | Class and Description |
---|---|
static class |
Transition.Builder
This helper class should be used to easily define a
Transition . |
Constructor and Description |
---|
Transition(int toRunningMode,
java.util.Set<Timer> startTimers,
java.util.Set<Timer> blockingTimers,
javax.measure.Measurable<javax.measure.quantity.Money> transitionCosts,
javax.measure.Measurable<javax.measure.quantity.Duration> transitionTime) |
Modifier and Type | Method and Description |
---|---|
static Transition.Builder |
create(int toRunningMode) |
static Transition.Builder |
create(RunningMode<?> toRunningMode) |
boolean |
equals(java.lang.Object obj) |
java.util.Set<Timer> |
getBlockingTimers() |
java.util.Set<Timer> |
getStartTimers() |
int |
getToRunningMode() |
javax.measure.Measurable<javax.measure.quantity.Money> |
getTransitionCosts() |
javax.measure.Measurable<javax.measure.quantity.Duration> |
getTransitionTime() |
int |
hashCode() |
java.lang.String |
toString() |
public Transition(int toRunningMode, java.util.Set<Timer> startTimers, java.util.Set<Timer> blockingTimers, javax.measure.Measurable<javax.measure.quantity.Money> transitionCosts, javax.measure.Measurable<javax.measure.quantity.Duration> transitionTime)
toRunningMode
- When making this transition this attributes indicates the new RunningMode
startTimers
- This is a set of zero or more Timer objects. All these timers have to be started when this transition
is made. E.g. when an actuator is being switched on, the “on” timer has to start to make sure that the
actuator will adhere to the correct minimum “on” time before switching off again.blockingTimers
- This is a set of zero or more Timer objects. All these timers have to be finished before the
transition can be made (this transition is blocked by the timers).transitionCosts
- It could be that the transition itself will cause wear to the actuator. The deprecation costs
associated with this transition may be expressed by this attribute.transitionTime
- In some cases a transition will not happen instantly. This attribute specifies the period of time
needed for going from one RunningMode to another (e.g. ramping up or down). It is important to note
that all timers are started at the beginning of the transition and not at its completion.public static Transition.Builder create(int toRunningMode)
toRunningMode
- Identifier the target of this Transition
Transition.Builder
object that can be used to easily create the Transition
public static Transition.Builder create(RunningMode<?> toRunningMode)
toRunningMode
- The target of this Transition
Transition.Builder
object that can be used to easily create the Transition
public int getToRunningMode()
RunningMode
public java.util.Set<Timer> getStartTimers()
public java.util.Set<Timer> getBlockingTimers()
public javax.measure.Measurable<javax.measure.quantity.Money> getTransitionCosts()
public javax.measure.Measurable<javax.measure.quantity.Duration> getTransitionTime()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object