rule
Class SensorClause

java.lang.Object
  |
  +--rule.Clause
        |
        +--rule.SensorClause

public class SensorClause
extends Clause

The SensorClause class implements a sensor clause that can be used as the antecedent in a rule.


Field Summary
(package private)  Sensor object
           
(package private)  java.lang.String sensorName
           
 
Fields inherited from class rule.Clause
cond, consequent, lhs, rhs, ruleRefs, truth
 
Constructor Summary
(package private) SensorClause(java.lang.String sName, RuleVariable Lhs)
          Creates a SensorClause object with the given parameters.
 
Method Summary
 java.lang.Boolean check()
          Checks the truth value returned from the sensor.
 java.lang.String display()
          Displays information about this sensor clause.
 
Methods inherited from class rule.Clause
addRuleRef, getRule, setConsequent, toString
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

object

Sensor object

sensorName

java.lang.String sensorName
Constructor Detail

SensorClause

SensorClause(java.lang.String sName,
             RuleVariable Lhs)
Creates a SensorClause object with the given parameters.
Parameters:
sName - the String object that contains the name of the sensor
Lhs - the RuleVariable object to be set in this sensor clause
Method Detail

display

public java.lang.String display()
Displays information about this sensor clause.
Returns:
the String object for display.

check

public java.lang.Boolean check()
Checks the truth value returned from the sensor.
Returns:
the Boolean object returned from the sensor
Overrides:
check in class Clause