dk.deepthought.sidious.greenhouse
Class ScreenSetPoint

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

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

This class implements the abstraction of a setpoint of the screens.

Author:
Deepthought

Nested Class Summary
private static class ScreenSetPoint.ScreenStep
          Internal enum to describe possible adjustments.
 
Field Summary
private  SuperLinkID irradianceID
          The id of the irradiance sensor.
private static org.apache.commons.logging.Log logger
          Logger for this class.
private  double setting
          The setting of this setpoint.
 
Constructor Summary
ScreenSetPoint(double setting)
          Creates a new ScreenSetPoint with the specified setting.
 
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 setpoint.


irradianceID

private final SuperLinkID irradianceID
The id of the irradiance sensor.

Constructor Detail

ScreenSetPoint

public ScreenSetPoint(double setting)
Creates a new ScreenSetPoint with the specified setting.

Input parameters should be between 0 and 100 percent. Parameters outside this will be rounded to nearest limit.

Parameters:
setting - the setting
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.