|
ABLE 2.0.0 07/02/2003 10:25:01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.able.data.AbleLhs | +--com.ibm.able.data.AbleArrayVariableExpression
This class provides read and/or write access to a field in an object that is the value of an AbleTypedVariable.
Field Summary | |
---|---|
protected AbleArrayVariable |
myArrayVariable
The array variable to which this field belongs. |
protected int |
myDataType
An AbleData.<DataType> constant that specifies this particular object's data type. |
protected AbleRd |
myIndexExpression
An expression used to compute the array index in the above array variable. |
Constructor Summary | |
---|---|
AbleArrayVariableExpression(AbleArrayVariable theArrayVariable,
AbleRd theIndexExpression)
Create a new array expression object. |
Method Summary | |
---|---|
java.lang.String |
arlCRdString()
Return a formal rule language "clause" string that describes this data object. |
java.lang.String |
arlDclString()
Return a formal rule language "declaration" string that describes this data object. |
void |
asgnEq(AbleRd theRhs)
Assignment (boolean): assign the current value of theRhs to this data object. |
void |
asgnIs(AbleRd theRhs)
Assignment (fuzzy): assign the current value of theRhs to this data object. |
void |
asgnIs(AbleRd theRhs,
double theTruthValue)
Assignment (fuzzy): assign the current value of theRhs to this data object, correlated with the specified truth value. |
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. |
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. |
static java.lang.String |
Copyright()
Determine the copyright of this class. |
boolean |
getBooleanValue()
Retrieve the value of this data object as a boolean value. |
int |
getDataType()
Retrieve the data type of this data object. |
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. |
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. |
AbleRd |
getIndexExpression()
|
double |
getNumericValue()
Retrieve the value of this data object as a numeric value. |
int |
getReferent()
Retrieve the Id of the variable to which this data object refers, if any. |
java.util.BitSet |
getReferents()
Retrieve the Ids of the variables to which this data object refers, if any. |
java.lang.String |
getStringValue()
Retrieve the value of this data object as a string value. |
java.lang.String |
getTemplateString(java.util.Vector theTemplateVars)
Return a formatted ARL text string for use by templates |
AbleLiteral |
getValue()
Retrieve the value of this data object as a literal. |
AbleArrayVariable |
getVariable()
|
boolean |
logicalAND(AbleRd theRhs)
Logical AND the current value of this data object with the current value of theRhs. |
boolean |
logicalNOT(AbleRd theRhs)
Logical NOT: complement the current value of this data object. |
boolean |
logicalOR(AbleRd theRhs)
Logical OR the current value of this data object with the current value of theRhs. |
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. |
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 |
xmlCRdString()
Return a formal XML "read clause" string that describes this data object; for example, "very, very hot". |
java.lang.String |
xmlCWrString()
Return a formal XML "clause write" string that describes this data object. |
java.lang.String |
xmlDclString()
Return a formal XML "declaration" string that describes this data object. |
Methods inherited from class com.ibm.able.data.AbleLhs |
---|
bitwiseAND, bitwiseNOT, bitwiseOR, bitwiseShiftLeft, bitwiseShiftRight, bitwiseShiftRightZeroFill, bitwiseXOR, cmpIs, compModulo, compUnaryMinus, isConstant |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected int myDataType
This field is initialized to AbleData.TypedVariableField.
protected AbleArrayVariable myArrayVariable
This field is initialized to null and changed by the constructor when a new typed variable field is created.
protected AbleRd myIndexExpression
This field is initialized to null and changed by the contructor when a new typed variable field is created.
Constructor Detail |
public AbleArrayVariableExpression(AbleArrayVariable theArrayVariable, AbleRd theIndexExpression)
theArrayVariable
- An array variable that contains the following element.
theIndexExpression
- An AbleRd object or AbleExpression that evaluates to a
specific element of the above array variable.
Method Detail |
public boolean getBooleanValue() throws AbleDataException
getBooleanValue
in class AbleLhs
AbleDataException
- If the value of this object cannot be represented as
a boolean value.public AbleFuzzySet getFuzzyValue() throws AbleDataException
getFuzzyValue
in class AbleLhs
AbleDataException
- If the value of this object cannot be represented as
a fuzzy value.public java.lang.Object getGenericValue() throws AbleDataException
getGenericValue
in class AbleLhs
AbleDataException
- If the value of this object cannot be represented as
an Object.public double getNumericValue() throws AbleDataException
getNumericValue
in class AbleLhs
AbleDataException
- If the value of this object cannot be represented as
a numeric value.public java.lang.String getStringValue() throws AbleDataException
getStringValue
in class AbleLhs
AbleDataException
- If the value of this object cannot be represented as
a string value.public AbleLiteral getValue() throws AbleDataException
getValue
in class AbleLhs
AbleDataException
- If the value of this object cannot be represented as
a literal.public int getReferent()
getReferent
in class AbleLhs
public java.util.BitSet getReferents()
public int getDataType()
getDataType
in class AbleLhs
public java.lang.String arlCRdString()
arlCRdString
in class AbleLhs
public java.lang.String xmlCRdString()
xmlCRdString
in class AbleLhs
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 class AbleLhs
theRhs
- 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
">" 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 class AbleLhs
theRhs
- 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
">=" 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 class AbleLhs
theRhs
- 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 cmpLt(AbleRd theRhs) throws AbleDataException
"<" 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 class AbleLhs
theRhs
- 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
"<=" 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 class AbleLhs
theRhs
- 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 class AbleLhs
theRhs
- 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 class AbleLhs
theRhs
- 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 class AbleLhs
theRhs
- 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 class AbleLhs
theRhs
- 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 class AbleLhs
theRhs
- 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 logicalAND(AbleRd theRhs) throws AbleDataException
"&&" is used for boolean AND.
logicalAND
in class AbleLhs
theRhs
- 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 logicalOR(AbleRd theRhs) throws AbleDataException
"||" is used for boolean OR.
logicalOR
in class AbleLhs
theRhs
- 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 logicalNOT(AbleRd theRhs) throws AbleDataException
"!" is used for boolean NOT.
logicalNOT
in class AbleLhs
theRhs
- 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 void setBooleanValue(boolean theNewValue) throws AbleDataException
setBooleanValue
in class AbleLhs
theNewValue
- 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 class AbleLhs
theNewValue
- A fuzzy set.
AbleDataException
- If the value of this object cannot be represented as
a fuzzy value.public void setGenericValue(java.lang.Object theNewValue) throws AbleDataException
setGenericValue
in class AbleLhs
theNewValue
- Any type of Object.
AbleDataException
- If the value of this object cannot be derived from
the specified Object.public void setNumericValue(double theNewValue) throws AbleDataException
setNumericValue
in class AbleLhs
theNewValue
- Any number.
AbleDataException
- If the value of this object cannot be represented as
a numeric value.public void setStringValue(java.lang.String theNewValue) throws AbleDataException
setStringValue
in class AbleLhs
theNewValue
- A string.
AbleDataException
- If the value of this object cannot be represented as
a string value.public void setValue(AbleLiteral theNewValue) throws AbleDataException
setValue
in class AbleLhs
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.
AbleDataException
- If the value of this object cannot be determined
from the literal object.public java.lang.String arlDclString()
This implementation always returns the empty string since fields and field references aren't explicitly declared anywhere.
arlDclString
in class AbleLhs
public java.lang.String xmlDclString()
This implementation always returns the empty string since fields and field references aren't explicitly declared anywhere.
xmlDclString
in class AbleLhs
public java.lang.String xmlCWrString()
xmlCWrString
in class AbleLhs
public java.lang.String getTemplateString(java.util.Vector theTemplateVars)
public void asgnEq(AbleRd theRhs) throws AbleDataException
asgnEq
in class AbleLhs
theRhs
- 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 void asgnIs(AbleRd theRhs) throws AbleDataException
asgnIs
in class AbleLhs
theRhs
- The right-hand, or source, side of the assignment.
This must be a fuzzy set.
AbleDataException
- If the right-hand side cannot be converted (if
necessary) and assigned to this data object.public void asgnIs(AbleRd theRhs, double theTruthValue) throws AbleDataException
asgnIs
in class AbleLhs
theRhs
- The right-hand, or source, side of the assignment.
This must be a fuzzy set.
theTruthValue
- the truth value with which theRhs is correlated.
AbleDataException
- If the right-hand side cannot be converted (if
necessary) and assigned to this data object.public AbleArrayVariable getVariable()
public AbleRd getIndexExpression()
public java.lang.Class getDataTypeClass()
AbleLhs
getDataTypeClass
in class AbleLhs
com.ibm.able.data.AbleLhs
public java.lang.String getDataTypeClassName()
AbleLhs
getDataTypeClassName
in class AbleLhs
com.ibm.able.data.AbleLhs
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String traceString(int theTraceStringFlavor)
traceString
in class AbleLhs
theFlavor
- An Able.TraceStringFlavor value.
public static java.lang.String Copyright()
|
ABLE 2.0.0 07/02/2003 10:25:01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |