|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dk.deepthought.sidious.greenhouse.HeaterSetPoint
@Immutable public final class HeaterSetPoint
This class implements the abstraction of a setpoint of the heater.
Nested Class Summary | |
---|---|
private static class |
HeaterSetPoint.HeaterStep
Internal enum to describe possible adjustments. |
Field Summary | |
---|---|
private static double |
FACTOR_PER_MINUTE
|
private SuperLinkID |
humidityID
Id of the humidity sensor. |
private static org.apache.commons.logging.Log |
logger
|
private double |
setting
The setting of this setpoint. |
private SuperLinkID |
temperatureID
Id of the temperature sensor. |
Constructor Summary | |
---|---|
HeaterSetPoint(double setting)
Creates a new HeaterSetPoint with the specified setting. |
Method Summary | |
---|---|
State |
consequence(State state)
Calculates the consequense of applying this adjustable to the specified state. |
private double |
decreaseFactor(double humidity)
Calculates the humidity decrease factor with respect to the increase in temperature. |
boolean |
equals(java.lang.Object obj)
|
SuperLinkID |
getID()
Returns the id of this Adjustable . |
double |
getSetting()
Returns the setting of this Adjustable . |
int |
hashCode()
|
java.util.Collection<Adjustable> |
possibleAdjustments()
Returns the possible adjustments from the current setting of this Adjustable . |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final org.apache.commons.logging.Log logger
private final double setting
private final SuperLinkID temperatureID
private final SuperLinkID humidityID
private static final double FACTOR_PER_MINUTE
Constructor Detail |
---|
public HeaterSetPoint(double setting)
HeaterSetPoint
with the specified setting.
setting
- the settingMethod Detail |
---|
public State consequence(State state)
Adjustable
Returns a new State
as the calculated consequence of
applying this adjustable to the specified state
.
consequence
in interface Adjustable
state
- the input state
State
from applying this adjustable
to state
private double decreaseFactor(double humidity)
humidity
- value of humidity
public java.util.Collection<Adjustable> possibleAdjustments()
Adjustable
Adjustable
.
The resulting adjustments represent all currently possible adjustments that can be applied to this adjustable.
possibleAdjustments
in interface Adjustable
public SuperLinkID getID()
Adjustable
Adjustable
.
getID
in interface Adjustable
public double getSetting()
Adjustable
Adjustable
.
getSetting
in interface Adjustable
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |