jhomenet.responsive
Class Condition<T>

java.lang.Object
  extended by jhomenet.responsive.Condition<T>
All Implemented Interfaces:
ExpressionElement
Direct Known Subclasses:
BooleanCondition, SensorCondition

public abstract class Condition<T>
extends java.lang.Object
implements ExpressionElement


Field Summary
protected  java.lang.String description
          Strings
protected  java.lang.String ID
          Strings
 
Constructor Summary
Condition()
          Default constructor.
 
Method Summary
abstract  boolean equals(Condition conditionToTest)
          Test for equality between two conditions.
abstract  boolean evaluateToBoolean()
          Evaluate the condition.
 java.lang.String evaluateToString()
          Get a string representation of the value stored in the element.
 void setDescription(java.lang.String desc)
          Set the condition's description.
 void setID(java.lang.String ID)
          Set the condition's ID.
abstract  java.lang.String toString()
          Get the string representation of the condition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface jhomenet.responsive.ExpressionElement
isSimple
 

Field Detail

ID

protected java.lang.String ID
Strings


description

protected java.lang.String description
Strings

Constructor Detail

Condition

public Condition()
Default constructor.

Method Detail

setID

public void setID(java.lang.String ID)
Set the condition's ID.

Parameters:
ID -

setDescription

public void setDescription(java.lang.String desc)
Set the condition's description.

Parameters:
desc -

evaluateToString

public java.lang.String evaluateToString()
Description copied from interface: ExpressionElement
Get a string representation of the value stored in the element.

Specified by:
evaluateToString in interface ExpressionElement
Returns:
String representation of the value
See Also:
ExpressionElement.evaluateToString()

evaluateToBoolean

public abstract boolean evaluateToBoolean()
Evaluate the condition.

Returns:
The boolean result

toString

public abstract java.lang.String toString()
Get the string representation of the condition.

Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

equals

public abstract boolean equals(Condition conditionToTest)
Test for equality between two conditions.

Parameters:
conditionToTest -
Returns:
Whether two conditions are equal


Copyright © 2004-2005 David Irwin. All Rights Reserved.