|
ABLE 2.3.0 07/13/2005 14:21:00 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectcom.ibm.able.data.AbleLhs
com.ibm.able.data.AbleVariable
com.ibm.able.data.AbleTypedVariable
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.
| 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 |
protected java.lang.String myDataTypeName
protected java.lang.Object myValue
protected transient java.lang.Class myDataTypeClass
protected java.lang.String myDataTypeClassName
protected java.util.Vector myInitialParms
| Constructor Detail |
public AbleTypedVariable(java.lang.String theName,
boolean theStaticFlag,
boolean theGlobalFlag,
java.lang.Object theInitialValue,
java.lang.String theDataTypeName)
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.
public AbleTypedVariable(java.lang.String theName,
boolean theStaticFlag,
boolean theGlobalFlag,
java.lang.String theDataTypeName,
java.lang.String theDataTypeClassName)
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.
public AbleTypedVariable(java.lang.String theName,
boolean theStaticFlag,
boolean theGlobalFlag,
java.lang.String theDataTypeName,
java.lang.Class theDataTypeClass)
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.
public AbleTypedVariable(java.lang.String theName,
java.lang.String theDataTypeName,
java.lang.String theDataTypeClassName)
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.
public AbleTypedVariable(AbleTypedVariable theTypedVar)
theTypedVar - An AbleTypeVariable to be cloned.| Method Detail |
public java.lang.Object getGenericValue()
throws AbleDataException
getGenericValue in interface AbleRdgetGenericValue in class AbleLhsAbleDataException - If the value of this object cannot be represented as
an Object.
public java.lang.String getStringValue()
throws AbleDataException
getStringValue in interface AbleRdgetStringValue in class AbleLhsAbleDataException - If the value of this object cannot be represented as
a string value.
public void asgnEq(AbleRd theRhs)
throws AbleDataException
asgnEq in interface AbleWrasgnEq in class AbleLhstheRhs - The right-hand, or source, side of the assignment.
AbleDataException - If the right-hand side cannot be converted (if
necessary) and assigned to this data object.
public boolean cmpEq(AbleRd theRhs)
throws AbleDataException
"==" is used for numeric and boolean compares; equals() is used for Object compares; and Collator.equals() is used for String compares.
cmpEq in interface AbleRdcmpEq in class AbleLhstheRhs - The right-hand side of the comparison.
AbleDataException - If the right-hand side cannot be converted (if
necessary) and compared to this data object.
public boolean cmpGt(AbleRd theRhs)
throws AbleDataException
AbleLhs">" 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.
cmpGt in interface AbleRdcmpGt in class AbleLhstheRhs - The right-hand side of the comparison.
AbleDataException - If the right-hand side cannot be converted (if
necessary) and compared to this data object.
public boolean cmpGtEq(AbleRd theRhs)
throws AbleDataException
AbleLhs">=" 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.
cmpGtEq in interface AbleRdcmpGtEq in class AbleLhstheRhs - The right-hand side of the comparison.
AbleDataException - If the right-hand side cannot be converted (if
necessary) and compared to this data object.
public double cmpIs(AbleRd theRhs)
throws AbleDataException
AbleLhsFuzzy membership is used for the compare.
cmpIs in interface AbleRdcmpIs in class AbleLhstheRhs - The right-hand side of the comparison.
This must be a fuzzy set.
AbleDataException - If the right-hand side cannot be converted (if
necessary) and compared to this data object.
public boolean cmpLt(AbleRd theRhs)
throws AbleDataException
AbleLhs"<" 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.
cmpLt in interface AbleRdcmpLt in class AbleLhstheRhs - The right-hand side of the comparison.
AbleDataException - If the right-hand side cannot be converted (if
necessary) and compared to this data object.
public boolean cmpLtEq(AbleRd theRhs)
throws AbleDataException
AbleLhs"<=" 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.
cmpLtEq in interface AbleRdcmpLtEq in class AbleLhstheRhs - The right-hand side of the comparison.
AbleDataException - If the right-hand side cannot be converted (if
necessary) and compared to this data object.
public boolean cmpNeq(AbleRd theRhs)
throws AbleDataException
"!=" is used for numeric and boolean compares; ! equals() is used for Object compares; and ! Collator.equals() is used for String compares.
cmpNeq in interface AbleRdcmpNeq in class AbleLhstheRhs - The right-hand side of the comparison.
AbleDataException - If the right-hand side cannot be converted (if
necessary) and compared to this data object.
public AbleLiteral compPlus(AbleRd theRhs)
throws AbleDataException
"+" is used for numeric addtion and String concatenation.
compPlus in interface AbleRdcompPlus in class AbleLhstheRhs - The right-hand side of the comparison.
AbleDataException - If the right-hand side cannot be converted (if
necessary) and compared to this data object.
public AbleLiteral compMinus(AbleRd theRhs)
throws AbleDataException
"-" is used for numeric subtraction.
compMinus in interface AbleRdcompMinus in class AbleLhstheRhs - The right-hand side of the comparison.
AbleDataException - If the right-hand side cannot be converted (if
necessary) and compared to this data object.
public AbleLiteral compMultiply(AbleRd theRhs)
throws AbleDataException
"*" is used for numeric multiplication.
compMultiply in interface AbleRdcompMultiply in class AbleLhstheRhs - The right-hand side of the comparison.
AbleDataException - If the right-hand side cannot be converted (if
necessary) and compared to this data object.
public AbleLiteral compDivide(AbleRd theRhs)
throws AbleDataException
"/" is used for numeric division.
compDivide in interface AbleRdcompDivide in class AbleLhstheRhs - The right-hand side of the comparison.
AbleDataException - If the right-hand side cannot be converted (if
necessary) and compared to this data object.
public AbleLiteral compUnaryMinus(AbleRd theRhs)
throws AbleDataException
"-" is used for numeric negation.
compUnaryMinus in interface AbleRdcompUnaryMinus in class AbleLhstheRhs - The right-hand side of the operation (ignored).
AbleDataException - If the value of this data object cannot be negated.
public void setBooleanValue(boolean theNewValue)
throws AbleDataException
setBooleanValue in interface AbleWrsetBooleanValue in class AbleLhstheNewValue - A boolean value.
AbleDataException - If the value of this object cannot be represented as
a boolean value.
public void setFuzzyValue(AbleFuzzySet theNewValue)
throws AbleDataException
setFuzzyValue in interface AbleWrsetFuzzyValue in class AbleLhstheNewValue - A fuzzy set.
AbleDataException - If the value of this object cannot be represented as
a fuzzy value.
public void setNumericValue(double theNewValue)
throws AbleDataException
setNumericValue in interface AbleWrsetNumericValue in class AbleLhstheNewValue - Any number.
AbleDataException - If the value of this object cannot be represented as
a numeric value.
public void setValue(AbleLiteral theNewValue)
throws AbleDataException
setValue in interface AbleWrsetValue in class AbleLhstheNewValue - 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.
AbleDataException - If the value of this object cannot be determined
from the literal object.
public void setGenericValue(java.lang.Object theNewValue)
throws AbleDataException
setGenericValue in interface AbleWrsetGenericValue in class AbleLhstheNewValue - Any type of Object.
AbleDataException - If the value of this object cannot be derived from
the specified Object.public java.lang.String arlDclString()
arlDclString in interface AbleWrarlDclString in class AbleVariablepublic java.lang.String xmlDclString()
xmlDclString in interface AbleWrxmlDclString in class AbleVariablepublic java.lang.String armlDclString()
armlDclString in class AbleVariablepublic java.lang.Class getDataTypeClass()
AbleLhs
getDataTypeClass in interface AbleRdgetDataTypeClass in class AbleLhspublic java.lang.String getDataTypeClassName()
AbleLhs
getDataTypeClassName in interface AbleRdgetDataTypeClassName in class AbleLhs
public void setStringValue(java.lang.String theNewValue)
throws AbleDataException
setStringValue in interface AbleWrsetStringValue in class AbleLhstheNewValue - A string.
AbleDataException - If the value of this object cannot be represented as
a string value.public java.lang.String getDataTypeName()
AbleVariable
getDataTypeName in class AbleVariable
public void reset()
throws AbleDataException
reset in class AbleVariableAbleDataException
public void init()
throws AbleDataException
init in class AbleVariableAbleDataException
public AbleFuzzySet getFuzzyValue()
throws AbleDataException
getFuzzyValue in interface AbleRdgetFuzzyValue in class AbleLhsAbleDataException - If the value of this object cannot be represented as
a fuzzy value.
public boolean getBooleanValue()
throws AbleDataException
getBooleanValue in interface AbleRdgetBooleanValue in class AbleLhsAbleDataException - If the value of this object cannot be represented as
a boolean value.public java.lang.Class getLiteralClass()
getLiteralClass in class AbleVariablepublic java.lang.String getValueString()
getValueString in class AbleVariable
public AbleLiteral getValue()
throws AbleDataException
getValue in interface AbleRdgetValue in class AbleLhsAbleDataException - If the value of this object cannot be represented as
a literal.
public double getNumericValue()
throws AbleDataException
getNumericValue in interface AbleRdgetNumericValue in class AbleLhsAbleDataException - If the value of this object cannot be represented as
a numeric value.
public void setValueString(java.lang.String theNewValue)
throws AbleDataException
setValueString in class AbleVariableAbleDataExceptionpublic void replaceValues(java.lang.Object theNewValue)
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.
theNewValue - Any type of Object.
public java.lang.String toString()
AbleVariable
toString in class AbleVariablepublic java.lang.String traceString(int theTraceStringFlavor)
traceString in interface AbleRdtraceString in class AbleVariabletheTraceStringFlavor - An Able.TraceStringFlavor value.
public void clear()
clear in interface AbleClearable
|
ABLE 2.3.0 07/13/2005 14:21:00 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||