|
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
com.ibm.able.data.AbleTimeStampVariable
This class wraps a value of the Java Calendar type in an AbleVariable object. An object of type AbleTimeStampVariable contains a single, mutable field whose type is Calendar. Instances of AbleTimeStampVariable are used by the Able rules classes in clauses and expressions. In addition, this class provides methods for converting a Calendar to other datatypes, setting a Calendar value using other datatypes, as well as other logical comparison and math operator methods useful when dealing with a Calendar.
| Field Summary | |
|---|---|
protected java.util.Calendar |
myValue
The current value of the variable. |
| Fields inherited from class com.ibm.able.data.AbleTypedVariable |
|---|
myDataTypeClass, myDataTypeClassName, myDataTypeName, myInitialParms |
| Fields inherited from class com.ibm.able.data.AbleVariable |
|---|
myBoundFlag, myChgSupport, myComment, myContext, myDataType, myGlobalFlag, myId, myName, myPrompt, myReferences, myStaticFlag, myTemplateFlag, myValueInitial |
| Constructor Summary | |
|---|---|
AbleTimeStampVariable(java.lang.String theName,
boolean theStaticFlag,
boolean theGlobalFlag,
java.util.Calendar theInitialValue)
Create a new numeric variable with the specified initial value. |
|
AbleTimeStampVariable(java.lang.String theName,
boolean theStaticFlag,
boolean theGlobalFlag,
java.lang.String theInitialValue)
Create a new numeric variable with the specified initial value. |
|
AbleTimeStampVariable(java.lang.String theName,
java.util.Calendar theInitialValue)
Create a new time stamp variable with the specified initial value. |
|
| 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. |
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. |
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. |
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.Object |
getRawValue()
Retrieve the variable's current 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 default or initial state. |
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.AbleTypedVariable |
|---|
asgnEq, clear, cmpIs, compDivide, compMinus, compMultiply, compPlus, compUnaryMinus, getDataTypeName, replaceValues |
| 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.util.Calendar myValue
| Constructor Detail |
public AbleTimeStampVariable(java.lang.String theName,
java.util.Calendar theInitialValue)
theName - The unique name of the variable.
theInitialValue - The value to which this variable is initially set.
public AbleTimeStampVariable(java.lang.String theName,
boolean theStaticFlag,
boolean theGlobalFlag,
java.util.Calendar theInitialValue)
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.
public AbleTimeStampVariable(java.lang.String theName,
boolean theStaticFlag,
boolean theGlobalFlag,
java.lang.String theInitialValue)
throws AbleDataException
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.
| Method Detail |
public boolean getBooleanValue()
throws AbleDataException
getBooleanValue in interface AbleRdgetBooleanValue in class AbleTypedVariableAbleDataException - If the value of this object cannot be represented as
a boolean value.
public AbleFuzzySet getFuzzyValue()
throws AbleDataException
getFuzzyValue in interface AbleRdgetFuzzyValue in class AbleTypedVariableAbleDataException - If the value of this object cannot be represented as
a fuzzy value.
public java.lang.Object getGenericValue()
throws AbleDataException
getGenericValue in interface AbleRdgetGenericValue in class AbleTypedVariableAbleDataException - If the value of this object cannot be represented as
an Object.
public double getNumericValue()
throws AbleDataException
getNumericValue in interface AbleRdgetNumericValue in class AbleTypedVariableAbleDataException - If the value of this object cannot be represented as
a numeric value.
public java.lang.String getStringValue()
throws AbleDataException
getStringValue in interface AbleRdgetStringValue in class AbleTypedVariableAbleDataException - If the value of this object cannot be represented as
a string value.
public AbleLiteral getValue()
throws AbleDataException
getValue in interface AbleRdgetValue in class AbleTypedVariableAbleDataException - If the value of this object cannot be represented as
a literal.
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 AbleTypedVariabletheRhs - 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 interface AbleRdcmpGt in class AbleTypedVariabletheRhs - 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 interface AbleRdcmpGtEq in class AbleTypedVariabletheRhs - 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 interface AbleRdcmpLt in class AbleTypedVariabletheRhs - 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 interface AbleRdcmpLtEq in class AbleTypedVariabletheRhs - 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 AbleTypedVariabletheRhs - 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 interface AbleWrsetBooleanValue in class AbleTypedVariabletheNewValue - A boolean value.
If the new value is true the variable is set to
1.0;
if the new value is false the variable is set to
0.0.
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 AbleTypedVariabletheNewValue - 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 interface AbleWrsetGenericValue in class AbleTypedVariabletheNewValue - 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 interface AbleWrsetNumericValue in class AbleTypedVariabletheNewValue - 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 interface AbleWrsetStringValue in class AbleTypedVariabletheNewValue - A string.
The variable is set to the value of the string, but
only if the string can be parsed to a double;
otherwise an exception is thrown.
AbleDataException - If the value of this object cannot be represented as
a string value.
public void setValue(AbleLiteral theNewValue)
throws AbleDataException
setValue in interface AbleWrsetValue in class AbleTypedVariabletheNewValue - 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()
arlDclString in interface AbleWrarlDclString in class AbleTypedVariablepublic java.lang.String xmlDclString()
xmlDclString in interface AbleWrxmlDclString in class AbleTypedVariablepublic java.lang.String armlDclString()
armlDclString in class AbleTypedVariable
public void setValueString(java.lang.String theNewValue)
throws AbleDataException
setValueString in class AbleTypedVariableAbleDataExceptionpublic java.lang.String getValueString()
getValueString in class AbleTypedVariable
public void reset()
throws AbleDataException
reset in class AbleTypedVariableAbleDataException
public void init()
throws AbleDataException
init in class AbleTypedVariableAbleDataExceptionpublic java.lang.Class getDataTypeClass()
AbleLhs
getDataTypeClass in interface AbleRdgetDataTypeClass in class AbleTypedVariablepublic java.lang.String getDataTypeClassName()
AbleLhs
getDataTypeClassName in interface AbleRdgetDataTypeClassName in class AbleTypedVariablepublic java.lang.Class getLiteralClass()
getLiteralClass in class AbleTypedVariablepublic java.lang.Object getRawValue()
public java.lang.String toString()
toString in class AbleTypedVariablepublic java.lang.String traceString(int theTraceStringFlavor)
traceString in interface AbleRdtraceString in class AbleTypedVariabletheTraceStringFlavor - An Able.TraceStringFlavor value.
|
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 | |||||||||||