ABLE, Version 1.1b

com.ibm.able.data
Class AbleCallLiteral

java.lang.Object
  |
  +--com.ibm.able.data.AbleLiteral
        |
        +--com.ibm.able.data.AbleCallLiteral

public class AbleCallLiteral
extends AbleLiteral
implements java.io.Serializable

This class defines the Able data sensor/effector call object.

Version:
$Revision: 1.3 $, $Date: 2000/08/18 17:15:42 $
See Also:
Serialized Form

Field Summary
protected  java.util.Vector myArgs
           
protected  java.lang.String myCallee
           
protected  java.lang.Object mySenEffMgr
           
protected  boolean mySensorFlag
           
protected  java.lang.Object myValue
           
 
Fields inherited from class com.ibm.able.data.AbleLiteral
myDataType
 
Constructor Summary
AbleCallLiteral(java.lang.Object theSenEffMgr, boolean theSensorFlag, java.lang.String theCallee, java.util.Vector theArgs)
          Create a new Able data call object with the specified information.
 
Method Summary
static java.lang.String Copyright()
          Determine the copyright of this class.
 java.util.Vector getArgs()
           
 boolean getBooleanValue()
          Retrieve the value of this data object as a boolean value.
 java.lang.String getCallee()
           
 AbleLiteral getFuzzyValue()
          Retrieve the value of this data object as a fuzzy value.
 java.lang.Object getGenericValue()
          Retrieve the value of this data object as an Object.
 double getNumericValue()
          Retrieve the value of this data object as a numeric value.
 java.lang.Object getRawValue()
           
 java.lang.String getStringValue()
          Retrieve the value of this data object as a string value.
 AbleLiteral getValue()
          Retrieve the value of this data object as a literal.
 boolean isSensor()
           
 java.lang.String rlCRdString()
          Return a formal rule language "clause read" string that describes this data object.
 java.lang.String toString()
          Retrieve a string describing (the contents of) the object.
 java.lang.String xmlCRdString()
          Return a formal XML "clause read" string that describes this data object.
 
Methods inherited from class com.ibm.able.data.AbleLiteral
cmpEq, cmpGt, cmpGtEq, cmpIs, cmpLt, cmpLtEq, cmpNeq, getDataType, getDataTypeAsString, getReferent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

myValue

protected java.lang.Object myValue

mySenEffMgr

protected java.lang.Object mySenEffMgr

mySensorFlag

protected boolean mySensorFlag

myCallee

protected java.lang.String myCallee

myArgs

protected java.util.Vector myArgs
Constructor Detail

AbleCallLiteral

public AbleCallLiteral(java.lang.Object theSenEffMgr,
                       boolean theSensorFlag,
                       java.lang.String theCallee,
                       java.util.Vector theArgs)
Create a new Able data call object with the specified information. The initial value of this literal is null, and it remains null until this literal is requested to give up a value. At that time, the sensor or effector is called to produce a value. Each time a value is requested from this literal, the sensor or effector is recalled; be aware that the current value may thus change from time to time.
Parameters:
theSenEffMgr - A reference to an object that implements either the AbleSensorManager interface or the AbleEffectorManager interface.

theSensorFlag - true if the name represents a sensor; false if the name represents an effector.

theCallee - The name of the sensor or effector to call.

theArgs - A list of AbleRd objects whose runtime values will be passed to the sensor or effector as arguments. Each converted argument will be a Boolean, a Double, a String, or an Object, depending on the type of each AbleRd object in the argument list.

Method Detail

getBooleanValue

public boolean getBooleanValue()
                        throws AbleDataException
Retrieve the value of this data object as a boolean value.
Returns:
A boolean, if the value of this object can be represented as a boolean value.
Throws:
AbleDataException - If the value of this object cannot be represented as a boolean value.
Overrides:
getBooleanValue in class AbleLiteral

getFuzzyValue

public AbleLiteral getFuzzyValue()
                          throws AbleDataException
Retrieve the value of this data object as a fuzzy value.
Returns:
A fuzzy set, if the value of this object can be represented as a fuzzy value. This method always throws an exception.
Throws:
AbleDataException - If the value of this object cannot be represented as a fuzzy value.
Overrides:
getFuzzyValue in class AbleLiteral

getGenericValue

public java.lang.Object getGenericValue()
                                 throws AbleDataException
Retrieve the value of this data object as an Object.
Returns:
Any type of object.
Throws:
AbleDataException - If the value of this object cannot be represented as an Object.
Overrides:
getGenericValue in class AbleLiteral

getNumericValue

public double getNumericValue()
                       throws AbleDataException
Retrieve the value of this data object as a numeric value.
Returns:
A double, if the value of this object can be represented as a numeric value.
Throws:
AbleDataException - If the value of this object cannot be represented as a numeric value.
Overrides:
getNumericValue in class AbleLiteral

getStringValue

public java.lang.String getStringValue()
                                throws AbleDataException
Retrieve the value of this data object as a string value.
Returns:
A String, if the value of this object can be represented as a string value.
Throws:
AbleDataException - If the value of this object cannot be represented as a string value.
Overrides:
getStringValue in class AbleLiteral

getValue

public AbleLiteral getValue()
                     throws AbleDataException
Retrieve the value of this data object as a literal.

The sensor or effector is called, which must return either a Boolean, Number derivative, String, or Object object, which will be turned into an AbleLiteral and returned.

If the sensor or effector returns null or some other object, an exception is thrown.

Returns:
An AbleLiteral object.
Throws:
AbleDataException - If the value of this object cannot be represented as an Able data literal.
Overrides:
getValue in class AbleLiteral

rlCRdString

public java.lang.String rlCRdString()
Return a formal rule language "clause read" string that describes this data object.
Returns:
A String describing the data object in formal rule language.
Overrides:
rlCRdString in class AbleLiteral

xmlCRdString

public java.lang.String xmlCRdString()
Return a formal XML "clause read" string that describes this data object.
Returns:
A String describing the data object in XML.
Overrides:
xmlCRdString in class AbleLiteral

getRawValue

public java.lang.Object getRawValue()

isSensor

public boolean isSensor()

getCallee

public java.lang.String getCallee()

getArgs

public java.util.Vector getArgs()

toString

public java.lang.String toString()
Retrieve a string describing (the contents of) the object.
Returns:
A String containing the current contents of the object.
Overrides:
toString in class AbleLiteral

Copyright

public static java.lang.String Copyright()
Determine the copyright of this class.
Returns:
A String containing this class's copyright statement.

ABLE, Version 1.1b

ABLE: Produced by Joe, Don, and Jeff who say, 'Thanks for your support.'