dk.deepthought.sidious.greenhouse
Class CO2SetPoint

java.lang.Object
  extended by dk.deepthought.sidious.greenhouse.CO2SetPoint
All Implemented Interfaces:
Adjustable

@Immutable
public class CO2SetPoint
extends java.lang.Object
implements Adjustable

This class represents the CO2 setpoint of the greenhouse.

Author:
Deepthought

Nested Class Summary
private static class CO2SetPoint.CO2Step
          Internal enum to describe possible adjustments.
 
Field Summary
private  SuperLinkID co2ID
          The id of the CO2 setpoint.
private static double DECREASE_PER_MIN
          Expected decrease per minute.
private static double INCREASE_PER_MIN
          Expected increase per minute.
private static org.apache.commons.logging.Log logger
          Logger for this class
private  double setting
          The setting of this CO2SetPoint.
 
Constructor Summary
CO2SetPoint(double setting)
          Constructor.
 
Method Summary
 State consequence(State state)
          Calculates the consequense of applying this adjustable to the specified state.
 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

logger

private static final org.apache.commons.logging.Log logger
Logger for this class


setting

private final double setting
The setting of this CO2SetPoint.


co2ID

private final SuperLinkID co2ID
The id of the CO2 setpoint.


INCREASE_PER_MIN

private static final double INCREASE_PER_MIN
Expected increase per minute.

See Also:
Constant Field Values

DECREASE_PER_MIN

private static final double DECREASE_PER_MIN
Expected decrease per minute.

See Also:
Constant Field Values
Constructor Detail

CO2SetPoint

public CO2SetPoint(double setting)
Constructor.

Parameters:
setting - the setting of this CO2SetPoint
Method Detail

consequence

public State consequence(State state)
Description copied from interface: Adjustable
Calculates the consequense of applying this adjustable to the specified state.

Returns a new State as the calculated consequence of applying this adjustable to the specified state.

Specified by:
consequence in interface Adjustable
Parameters:
state - the input state
Returns:
the resulting State from applying this adjustable to state

possibleAdjustments

public java.util.Collection<Adjustable> possibleAdjustments()
Description copied from interface: Adjustable
Returns the possible adjustments from the current setting of this Adjustable.

The resulting adjustments represent all currently possible adjustments that can be applied to this adjustable.

Specified by:
possibleAdjustments in interface Adjustable
Returns:
the new possible settings

getID

public SuperLinkID getID()
Description copied from interface: Adjustable
Returns the id of this Adjustable.

Specified by:
getID in interface Adjustable
Returns:
the id of this adjustable

getSetting

public double getSetting()
Description copied from interface: Adjustable
Returns the setting of this Adjustable.

Specified by:
getSetting in interface Adjustable
Returns:
the setting of this adjustable

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © Deepthought Development - All Rights Reserved.