ABLE 2.3.0 07/13/2005 14:21:00

com.ibm.able.data
Class AbleTypedVariable

java.lang.Object
  extended bycom.ibm.able.data.AbleLhs
      extended bycom.ibm.able.data.AbleVariable
          extended bycom.ibm.able.data.AbleTypedVariable
All Implemented Interfaces:
AbleClearable, AbleRd, AbleWr, java.io.Serializable
Direct Known Subclasses:
AbleArrayVariable, AbleBooleanVariable, AbleBuiltInVariable, AbleByteVariable, AbleCategoricalVariable, AbleCharacterVariable, AbleClassVariable, AbleDiscreteVariable, AbleDoubleVariable, AbleExpressionVariable, AbleFloatVariable, AbleGenericVariable, AbleIntegerVariable, AbleLongVariable, AbleShortVariable, AbleStringVariable, AbleTimeStampVariable

public class AbleTypedVariable
extends AbleVariable
implements AbleClearable, java.io.Serializable

This class defines an AbleVariable that takes values of a single specified Class or implementors of a specified Interface. The datatype must be specified on the constructor, either by providing an instance of the intended type or by explicitly stating the data type name and corresponding data type class name.

Instances of AbleTypedVariables can be null or can hold an instance of the declared type of object. Methods can be called on the object values using AbleTypedVariableMethodLiterals. Data members can be access using AbleTypedVariableFields.

See Also:
Serialized Form

Field Summary
protected  java.lang.Class myDataTypeClass
          The class of this data type.
protected  java.lang.String myDataTypeClassName
          The class name of this data type
protected  java.lang.String myDataTypeName
          The name of this data type.
protected  java.util.Vector myInitialParms
          The parameters used when the initial value of this object was constructed.
protected  java.lang.Object myValue
          The current value of the variable.
 
Fields inherited from class com.ibm.able.data.AbleVariable
myBoundFlag, myChgSupport, myComment, myContext, myDataType, myGlobalFlag, myId, myName, myPrompt, myReferences, myStaticFlag, myTemplateFlag, myValueInitial
 
Constructor Summary
AbleTypedVariable(AbleTypedVariable theTypedVar)
          Create a duplicate of this variable with the same initial value and type but with the name suffixed with "clone".
AbleTypedVariable(java.lang.String theName, boolean theStaticFlag, boolean theGlobalFlag, java.lang.Object theInitialValue, java.lang.String theDataTypeName)
          Create a new typed variable.
AbleTypedVariable(java.lang.String theName, boolean theStaticFlag, boolean theGlobalFlag, java.lang.String theDataTypeName, java.lang.Class theDataTypeClass)
          Create a new typed variable with a null initial value .
AbleTypedVariable(java.lang.String theName, boolean theStaticFlag, boolean theGlobalFlag, java.lang.String theDataTypeName, java.lang.String theDataTypeClassName)
          Create a new typed variable with a null initial value .
AbleTypedVariable(java.lang.String theName, java.lang.String theDataTypeName, java.lang.String theDataTypeClassName)
          Create a new typed variable with a null initial value and with the global and static flags set to false.
 
Method Summary
 java.lang.String arlDclString()
          Return a formal ARL "declaration" string that describes this data object.
 java.lang.String armlDclString()
          Return a formal XML "declaration" string that describes this data object.
 void asgnEq(AbleRd theRhs)
          Assignment: assign the current value of theRhs to this data object.
 void clear()
           
 boolean cmpEq(AbleRd theRhs)
          Comparison, equal to: compare the current value of this data object to the current value of theRhs.
 boolean cmpGt(AbleRd theRhs)
          Comparison, greater than: compare the current value of this data object to the current value of theRhs.
 boolean cmpGtEq(AbleRd theRhs)
          Comparison, greater than or equal to: compare the current value of this data object to the current value of theRhs.
 double cmpIs(AbleRd theRhs)
          Comparison, fuzzy equal to: compare the current value of this data object to the current value of theRhs.
 boolean cmpLt(AbleRd theRhs)
          Comparison, less than: compare the current value of this data object to the current value of theRhs.
 boolean cmpLtEq(AbleRd theRhs)
          Comparison, less than or equal to: compare the current value of this data object to the current value of theRhs.
 boolean cmpNeq(AbleRd theRhs)
          Comparison, not equal to: compare the current value of this data object to the current value of theRhs.
 AbleLiteral compDivide(AbleRd theRhs)
          Compute, divide the current value of this data object by the current value of theRhs.
 AbleLiteral compMinus(AbleRd theRhs)
          Compute, subtract the current value of theRhs from the current value of this object.
 AbleLiteral compMultiply(AbleRd theRhs)
          Compute, multiply the current value of this data object to the current value of theRhs.
 AbleLiteral compPlus(AbleRd theRhs)
          Compute, add or concatenate the current value of this data object to the current value of theRhs.
 AbleLiteral compUnaryMinus(AbleRd theRhs)
          Compute, the unary minus of the current value of this object.
 boolean getBooleanValue()
          Retrieve the value of this data object as a boolean value.
 java.lang.Class getDataTypeClass()
          Retrieve the actual class of this object's underlying data type.
 java.lang.String getDataTypeClassName()
          Retrieve the name of the class of this object's underlying data type.
 java.lang.String getDataTypeName()
          Retrieve the data type name.
 AbleFuzzySet 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.
 java.lang.Class getLiteralClass()
          Retrieve the class of this variable's related AbleLiteral data type.
 double getNumericValue()
          Retrieve the value of this data object as a numeric value.
 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.
 java.lang.String getValueString()
          Retrieve the variable's current value as a string.
 void init()
          Init the variable to its initial state.
 void replaceValues(java.lang.Object theNewValue)
          Replace both the current value and the initial value with the specified new value.
 void reset()
          Reset the variable to its initial state.
 void setBooleanValue(boolean theNewValue)
          Set the value of this data object from a boolean value.
 void setFuzzyValue(AbleFuzzySet theNewValue)
          Set the value of this data object from a fuzzy value.
 void setGenericValue(java.lang.Object theNewValue)
          Set the value of this data object from an object.
 void setNumericValue(double theNewValue)
          Set the value of this data object from a numeric value.
 void setStringValue(java.lang.String theNewValue)
          Set the value of this data object from a string value.
 void setValue(AbleLiteral theNewValue)
          Set the value of this data object from a literal object.
 void setValueString(java.lang.String theNewValue)
          Set the variable's current value from a string.
 java.lang.String toString()
          Retrieve a string describing (the contents of) the object.
 java.lang.String traceString(int theTraceStringFlavor)
          Retrieve a string describing (the contents of) the object.
 java.lang.String xmlDclString()
          Return a formal XML "declaration" string that describes this data object.
 
Methods inherited from class com.ibm.able.data.AbleVariable
arlCRdString, arlInitializerString, armlCRdString, armlInitializerString, getArlComment, getChgSupport, getComment, getContext, getDataType, getDataTypeAsString, getId, getName, getPrompt, getPromptString, getReferences, getReferent, getReferents, getTemplateString, isBound, isConstant, isGlobal, isLocal, isStatic, isTemplate, notStatic, setChgSupport, setComment, setContext, setId, setInitialValue, setPrompt, setReferences, setStatic, setTemplate, xmlCRdString, xmlCWrString, xmlInitializerString
 
Methods inherited from class com.ibm.able.data.AbleLhs
asgnIs, asgnIs, bitwiseAND, bitwiseNOT, bitwiseOR, bitwiseShiftLeft, bitwiseShiftRight, bitwiseShiftRightZeroFill, bitwiseXOR, compModulo, logicalAND, logicalNOT, logicalOR
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

myDataTypeName

protected java.lang.String myDataTypeName
The name of this data type.


myValue

protected java.lang.Object myValue
The current value of the variable.


myDataTypeClass

protected transient java.lang.Class myDataTypeClass
The class of this data type.


myDataTypeClassName

protected java.lang.String myDataTypeClassName
The class name of this data type


myInitialParms

protected java.util.Vector myInitialParms
The parameters used when the initial value of this object was constructed.

Constructor Detail

AbleTypedVariable

public AbleTypedVariable(java.lang.String theName,
                         boolean theStaticFlag,
                         boolean theGlobalFlag,
                         java.lang.Object theInitialValue,
                         java.lang.String theDataTypeName)
Create a new typed variable. The initial value must be an instance of the type the variable represents.

Parameters:
theName - The unique name of the variable.

theStaticFlag - Use true if this variable is to be marked as static, which means that it will ignore future reset requests; use false if the variable can be reset to its initial value when requested.

theGlobalFlag - Use true if this variable is to be considered global; use false if the variable is to be considered local.

theInitialValue - The value to which this variable is initially set. It must be an instance of theDataTypeClass.

theDataTypeName - The name of a user-defined data type.

AbleTypedVariable

public AbleTypedVariable(java.lang.String theName,
                         boolean theStaticFlag,
                         boolean theGlobalFlag,
                         java.lang.String theDataTypeName,
                         java.lang.String theDataTypeClassName)
Create a new typed variable with a null initial value .

Parameters:
theName - The unique name of the variable.

theStaticFlag - Use true if this variable is to be marked as static, which means that it will ignore future reset requests; use false if the variable can be reset to its initial value when requested.

theGlobalFlag - Use true if this variable is to be considered global; use false if the variable is to be considered local.

theDataTypeName - The name of a user-defined data type.

theDataTypeClassName - The fully qualified name of the user-defined data type.


AbleTypedVariable

public AbleTypedVariable(java.lang.String theName,
                         boolean theStaticFlag,
                         boolean theGlobalFlag,
                         java.lang.String theDataTypeName,
                         java.lang.Class theDataTypeClass)
Create a new typed variable with a null initial value .

Parameters:
theName - The unique name of the variable.

theStaticFlag - Use true if this variable is to be marked as static, which means that it will ignore future reset requests; use false if the variable can be reset to its initial value when requested.

theGlobalFlag - Use true if this variable is to be considered global; use false if the variable is to be considered local.

theDataTypeName - The name of a user-defined data type.

theDataTypeClass - The Class of the user-defined data type.


AbleTypedVariable

public AbleTypedVariable(java.lang.String theName,
                         java.lang.String theDataTypeName,
                         java.lang.String theDataTypeClassName)
Create a new typed variable with a null initial value and with the global and static flags set to false.

Parameters:
theName - The unique name of the variable.

theDataTypeName - The name of a user-defined data type.

theDataTypeClassName - The fully qualified name of the user-defined data type.


AbleTypedVariable

public AbleTypedVariable(AbleTypedVariable theTypedVar)
Create a duplicate of this variable with the same initial value and type but with the name suffixed with "clone". These vars are not placed in the global symbol table and are used as temporary variables. This constructor is used by the AbleBeanLib.createInstance() method.

Parameters:
theTypedVar - An AbleTypeVariable to be cloned.
Method Detail

getGenericValue

public java.lang.Object getGenericValue()
                                 throws AbleDataException
Retrieve the value of this data object as an Object.

Specified by:
getGenericValue in interface AbleRd
Specified by:
getGenericValue in class AbleLhs
Returns:
Any type of object.
Throws:
AbleDataException - If the value of this object cannot be represented as an Object.

getStringValue

public java.lang.String getStringValue()
                                throws AbleDataException
Retrieve the value of this data object as a string value.

Specified by:
getStringValue in interface AbleRd
Specified by:
getStringValue in class AbleLhs
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.

asgnEq

public void asgnEq(AbleRd theRhs)
            throws AbleDataException
Assignment: assign the current value of theRhs to this data object.

Specified by:
asgnEq in interface AbleWr
Overrides:
asgnEq in class AbleLhs
Parameters:
theRhs - The right-hand, or source, side of the assignment.

Throws:
AbleDataException - If the right-hand side cannot be converted (if necessary) and assigned to this data object.

cmpEq

public boolean cmpEq(AbleRd theRhs)
              throws AbleDataException
Comparison, equal to: compare the current value of this data object to the current value of theRhs.

"==" is used for numeric and boolean compares; equals() is used for Object compares; and Collator.equals() is used for String compares.

Specified by:
cmpEq in interface AbleRd
Overrides:
cmpEq in class AbleLhs
Parameters:
theRhs - The right-hand side of the comparison.

Returns:
true, if this data object is equal to theRhs; false, otherwise.
Throws:
AbleDataException - If the right-hand side cannot be converted (if necessary) and compared to this data object.

cmpGt

public boolean cmpGt(AbleRd theRhs)
              throws AbleDataException
Description copied from class: AbleLhs
Comparison, greater than: compare the current value of this data object to the current value of theRhs.

">" is used for numeric compares; Collator.compare() is used for String compares. Use of other data types on the left-hand side causes an exception.

Specified by:
cmpGt in interface AbleRd
Overrides:
cmpGt in class AbleLhs
Parameters:
theRhs - The right-hand side of the comparison.

Returns:
true, if this data object is greater than theRhs; false, otherwise.
Throws:
AbleDataException - If the right-hand side cannot be converted (if necessary) and compared to this data object.

cmpGtEq

public boolean cmpGtEq(AbleRd theRhs)
                throws AbleDataException
Description copied from class: AbleLhs
Comparison, greater than or equal to: compare the current value of this data object to the current value of theRhs.

">=" is used for numeric compares; Collator.compare() is used for String compares. Use of other data types on the left-hand side causes an exception.

Specified by:
cmpGtEq in interface AbleRd
Overrides:
cmpGtEq in class AbleLhs
Parameters:
theRhs - The right-hand side of the comparison.

Returns:
true, if this data object is greater than or equal to theRhs; false, otherwise.
Throws:
AbleDataException - If the right-hand side cannot be converted (if necessary) and compared to this data object.

cmpIs

public double cmpIs(AbleRd theRhs)
             throws AbleDataException
Description copied from class: AbleLhs
Comparison, fuzzy equal to: compare the current value of this data object to the current value of theRhs.

Fuzzy membership is used for the compare.

Specified by:
cmpIs in interface AbleRd
Overrides:
cmpIs in class AbleLhs
Parameters:
theRhs - The right-hand side of the comparison. This must be a fuzzy set.

Returns:
The membership of the fuzzy variable's crisp value within the fuzzy ste.
Throws:
AbleDataException - If the right-hand side cannot be converted (if necessary) and compared to this data object.

cmpLt

public boolean cmpLt(AbleRd theRhs)
              throws AbleDataException
Description copied from class: AbleLhs
Comparison, less than: compare the current value of this data object to the current value of theRhs.

"<" is used for numeric compares; Collator.compare() is used for String compares. Use of other data types on the left-hand side causes an exception.

Specified by:
cmpLt in interface AbleRd
Overrides:
cmpLt in class AbleLhs
Parameters:
theRhs - The right-hand side of the comparison.

Returns:
true, if this data object is less than theRhs; false, otherwise.
Throws:
AbleDataException - If the right-hand side cannot be converted (if necessary) and compared to this data object.

cmpLtEq

public boolean cmpLtEq(AbleRd theRhs)
                throws AbleDataException
Description copied from class: AbleLhs
Comparison, less than or equal to: compare the current value of this data object to the current value of theRhs.

"<=" is used for numeric compares; Collator.compare() is used for String compares. Use of other data types on the left-hand side causes an exception.

Specified by:
cmpLtEq in interface AbleRd
Overrides:
cmpLtEq in class AbleLhs
Parameters:
theRhs - The right-hand side of the comparison.

Returns:
true, if this data object is less than or equal to theRhs; false, otherwise.
Throws:
AbleDataException - If the right-hand side cannot be converted (if necessary) and compared to this data object.

cmpNeq

public boolean cmpNeq(AbleRd theRhs)
               throws AbleDataException
Comparison, not equal to: compare the current value of this data object to the current value of theRhs.

"!=" is used for numeric and boolean compares; ! equals() is used for Object compares; and ! Collator.equals() is used for String compares.

Specified by:
cmpNeq in interface AbleRd
Overrides:
cmpNeq in class AbleLhs
Parameters:
theRhs - The right-hand side of the comparison.

Returns:
true, if this data object is not equal to theRhs; false, otherwise.
Throws:
AbleDataException - If the right-hand side cannot be converted (if necessary) and compared to this data object.

compPlus

public AbleLiteral compPlus(AbleRd theRhs)
                     throws AbleDataException
Compute, add or concatenate the current value of this data object to the current value of theRhs.

"+" is used for numeric addtion and String concatenation.

Specified by:
compPlus in interface AbleRd
Overrides:
compPlus in class AbleLhs
Parameters:
theRhs - The right-hand side of the comparison.

Returns:
The result of the addition or concatenation operation.
Throws:
AbleDataException - If the right-hand side cannot be converted (if necessary) and compared to this data object.

compMinus

public AbleLiteral compMinus(AbleRd theRhs)
                      throws AbleDataException
Compute, subtract the current value of theRhs from the current value of this object.

"-" is used for numeric subtraction.

Specified by:
compMinus in interface AbleRd
Overrides:
compMinus in class AbleLhs
Parameters:
theRhs - The right-hand side of the comparison.

Returns:
The result of the subtraction operation.
Throws:
AbleDataException - If the right-hand side cannot be converted (if necessary) and compared to this data object.

compMultiply

public AbleLiteral compMultiply(AbleRd theRhs)
                         throws AbleDataException
Compute, multiply the current value of this data object to the current value of theRhs.

"*" is used for numeric multiplication.

Specified by:
compMultiply in interface AbleRd
Overrides:
compMultiply in class AbleLhs
Parameters:
theRhs - The right-hand side of the comparison.

Returns:
The result of the multiplication operation.
Throws:
AbleDataException - If the right-hand side cannot be converted (if necessary) and compared to this data object.

compDivide

public AbleLiteral compDivide(AbleRd theRhs)
                       throws AbleDataException
Compute, divide the current value of this data object by the current value of theRhs.

"/" is used for numeric division.

Specified by:
compDivide in interface AbleRd
Overrides:
compDivide in class AbleLhs
Parameters:
theRhs - The right-hand side of the comparison.

Returns:
The result of the division operation.
Throws:
AbleDataException - If the right-hand side cannot be converted (if necessary) and compared to this data object.

compUnaryMinus

public AbleLiteral compUnaryMinus(AbleRd theRhs)
                           throws AbleDataException
Compute, the unary minus of the current value of this object.

"-" is used for numeric negation.

Specified by:
compUnaryMinus in interface AbleRd
Overrides:
compUnaryMinus in class AbleLhs
Parameters:
theRhs - The right-hand side of the operation (ignored).

Returns:
The result of the negation operation.
Throws:
AbleDataException - If the value of this data object cannot be negated.

setBooleanValue

public void setBooleanValue(boolean theNewValue)
                     throws AbleDataException
Set the value of this data object from a boolean value.

Specified by:
setBooleanValue in interface AbleWr
Specified by:
setBooleanValue in class AbleLhs
Parameters:
theNewValue - A boolean value.

Throws:
AbleDataException - If the value of this object cannot be represented as a boolean value.

setFuzzyValue

public void setFuzzyValue(AbleFuzzySet theNewValue)
                   throws AbleDataException
Set the value of this data object from a fuzzy value. This method always throws an exception.

Specified by:
setFuzzyValue in interface AbleWr
Specified by:
setFuzzyValue in class AbleLhs
Parameters:
theNewValue - A fuzzy set.

Throws:
AbleDataException - If the value of this object cannot be represented as a fuzzy value.

setNumericValue

public void setNumericValue(double theNewValue)
                     throws AbleDataException
Set the value of this data object from a numeric value.

Specified by:
setNumericValue in interface AbleWr
Specified by:
setNumericValue in class AbleLhs
Parameters:
theNewValue - Any number.

Throws:
AbleDataException - If the value of this object cannot be represented as a numeric value.

setValue

public void setValue(AbleLiteral theNewValue)
              throws AbleDataException
Set the value of this data object from a literal object.

Specified by:
setValue in interface AbleWr
Specified by:
setValue in class AbleLhs
Parameters:
theNewValue - An Able literal of any type. An attempt is made to convert the literal to an appropriate type before assigning it to this "writable" object.

Throws:
AbleDataException - If the value of this object cannot be determined from the literal object.

setGenericValue

public void setGenericValue(java.lang.Object theNewValue)
                     throws AbleDataException
Set the value of this data object from an object.

Specified by:
setGenericValue in interface AbleWr
Specified by:
setGenericValue in class AbleLhs
Parameters:
theNewValue - Any type of Object.

Throws:
AbleDataException - If the value of this object cannot be derived from the specified Object.

arlDclString

public java.lang.String arlDclString()
Return a formal ARL "declaration" string that describes this data object.

Specified by:
arlDclString in interface AbleWr
Specified by:
arlDclString in class AbleVariable
Returns:
A String describing the data object in formal rule language.

xmlDclString

public java.lang.String xmlDclString()
Return a formal XML "declaration" string that describes this data object.

Specified by:
xmlDclString in interface AbleWr
Specified by:
xmlDclString in class AbleVariable
Returns:
A String describing the data object in XML.

armlDclString

public java.lang.String armlDclString()
Return a formal XML "declaration" string that describes this data object.

Specified by:
armlDclString in class AbleVariable
Returns:
A String describing the data object in XML.

getDataTypeClass

public java.lang.Class getDataTypeClass()
Description copied from class: AbleLhs
Retrieve the actual class of this object's underlying data type.

Specified by:
getDataTypeClass in interface AbleRd
Specified by:
getDataTypeClass in class AbleLhs
Returns:
The class of the underlying data type.

getDataTypeClassName

public java.lang.String getDataTypeClassName()
Description copied from class: AbleLhs
Retrieve the name of the class of this object's underlying data type.

Specified by:
getDataTypeClassName in interface AbleRd
Specified by:
getDataTypeClassName in class AbleLhs
Returns:
A String that is the name of the class of the underlying data type.

setStringValue

public void setStringValue(java.lang.String theNewValue)
                    throws AbleDataException
Set the value of this data object from a string value.

Specified by:
setStringValue in interface AbleWr
Specified by:
setStringValue in class AbleLhs
Parameters:
theNewValue - A string.

Throws:
AbleDataException - If the value of this object cannot be represented as a string value.

getDataTypeName

public java.lang.String getDataTypeName()
Description copied from class: AbleVariable
Retrieve the data type name. This is the name used in the ABLE Rule Set, for example, Integer, Customer, etc. not the underlying class name which is usually different TypedVariables return the name of the imported type. Built-in variables return the built-in type (i.e. Integer).

Specified by:
getDataTypeName in class AbleVariable

reset

public void reset()
           throws AbleDataException
Reset the variable to its initial state.

Specified by:
reset in class AbleVariable
Throws:
AbleDataException

init

public void init()
          throws AbleDataException
Init the variable to its initial state.

Specified by:
init in class AbleVariable
Throws:
AbleDataException

getFuzzyValue

public AbleFuzzySet getFuzzyValue()
                           throws AbleDataException
Retrieve the value of this data object as a fuzzy value.

Specified by:
getFuzzyValue in interface AbleRd
Specified by:
getFuzzyValue in class AbleLhs
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.

getBooleanValue

public boolean getBooleanValue()
                        throws AbleDataException
Retrieve the value of this data object as a boolean value.

Specified by:
getBooleanValue in interface AbleRd
Specified by:
getBooleanValue in class AbleLhs
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.

getLiteralClass

public java.lang.Class getLiteralClass()
Retrieve the class of this variable's related AbleLiteral data type.

Specified by:
getLiteralClass in class AbleVariable
Returns:
The class of the literal data type.

getValueString

public java.lang.String getValueString()
Retrieve the variable's current value as a string. Note: This method is provided for the use of a rule language parser.

Specified by:
getValueString in class AbleVariable

getValue

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

Specified by:
getValue in interface AbleRd
Specified by:
getValue in class AbleLhs
Returns:
An AbleGenericLiteral object.
Throws:
AbleDataException - If the value of this object cannot be represented as a literal.

getNumericValue

public double getNumericValue()
                       throws AbleDataException
Retrieve the value of this data object as a numeric value.

Specified by:
getNumericValue in interface AbleRd
Specified by:
getNumericValue in class AbleLhs
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.

setValueString

public void setValueString(java.lang.String theNewValue)
                    throws AbleDataException
Set the variable's current value from a string. Note: This method is provided for the use of a rule language parser.

Specified by:
setValueString in class AbleVariable
Throws:
AbleDataException

replaceValues

public void replaceValues(java.lang.Object theNewValue)
Replace both the current value and the initial value with the specified new value.

Even though this method is public, it is primarily for the use of AbleRuleSet objects so that the special variable called "parent" can be updated easily when the ruleset's parent changes. It is dangerous for others to use this method.

Parameters:
theNewValue - Any type of Object.


toString

public java.lang.String toString()
Description copied from class: AbleVariable
Retrieve a string describing (the contents of) the object.

Overrides:
toString in class AbleVariable
Returns:
A String containing the current contents of the object.

traceString

public java.lang.String traceString(int theTraceStringFlavor)
Retrieve a string describing (the contents of) the object.

Specified by:
traceString in interface AbleRd
Specified by:
traceString in class AbleVariable
Parameters:
theTraceStringFlavor - An Able.TraceStringFlavor value.

Returns:
A String containing the current contents of the object.

clear

public void clear()
Specified by:
clear in interface AbleClearable

ABLE 2.3.0 07/13/2005 14:21:00

(C) Copyright IBM Corporation 1999, 2005