|
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.AbleLiteral | +--com.ibm.able.data.AbleBooleanLiteral
This class wraps a value of the primitive type boolean in an object. An object of type AbleBooleanLiteral contains a single, immutable field whose type is boolean. Instances of AbleBooleanLiteral are used by the Able rules classes in clauses and expressions. In addition, this class provides methods for converting a boolean to a String value as well as other logical comparison and math operator methods useful when dealing with a boolean.
Field Summary | |
---|---|
static AbleBooleanLiteral |
FALSE
|
protected boolean |
myValue
The immutable value of this literal. |
static AbleBooleanLiteral |
TRUE
|
Constructor Summary | |
---|---|
AbleBooleanLiteral(boolean theValue)
Create a new literal with the specified value. |
Method Summary | |
---|---|
java.lang.String |
arlCRdString()
Return a formal ARL "clause read" string that describes this data object. |
AbleLiteral |
bitwiseXOR(AbleRd theRhs)
Logical XOR: exclusive OR the current value of this data object with the current value of theRhs. |
boolean |
cmpEq(AbleRd theRhs)
Comparison, 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 |
equals(java.lang.Object theOtherObject)
|
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. |
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. |
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. |
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 "clause read" string that describes this data object. |
Methods inherited from class com.ibm.able.data.AbleLiteral |
---|
bitwiseAND, bitwiseNOT, bitwiseOR, bitwiseShiftLeft, bitwiseShiftRight, bitwiseShiftRightZeroFill, cmpGt, cmpGtEq, cmpIs, cmpLt, cmpLtEq, compDivide, compMinus, compModulo, compMultiply, compPlus, compUnaryMinus, Copyright, getDataTypeAsString, getReferent, getReferents, getTemplateString, isConstant |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected boolean myValue
public static final AbleBooleanLiteral TRUE
public static final AbleBooleanLiteral FALSE
Constructor Detail |
public AbleBooleanLiteral(boolean theValue)
theValue
- The value to which this literal is to be set.
Method Detail |
public boolean getBooleanValue() throws AbleDataException
getBooleanValue
in class AbleLiteral
AbleDataException
- If the value of this object cannot be represented as
a boolean value.public AbleFuzzySet getFuzzyValue() throws AbleDataException
getFuzzyValue
in class AbleLiteral
AbleDataException
- If the value of this object cannot be represented as
a fuzzy value.public java.lang.Object getGenericValue() throws AbleDataException
getGenericValue
in class AbleLiteral
AbleDataException
- If the value of this object cannot be represented as
an Object.public double getNumericValue() throws AbleDataException
getNumericValue
in class AbleLiteral
AbleDataException
- If the value of this object cannot be represented as
a numeric value.public java.lang.String getStringValue() throws AbleDataException
getStringValue
in class AbleLiteral
AbleDataException
- If the value of this object cannot be represented as
a string value.public AbleLiteral getValue() throws AbleDataException
getValue
in class AbleLiteral
AbleDataException
- If the value of this object cannot be represented as
a literal.public java.lang.Class getDataTypeClass()
AbleLiteral
getDataTypeClass
in class AbleLiteral
com.ibm.able.data.AbleLiteral
public java.lang.String getDataTypeClassName()
AbleLiteral
getDataTypeClassName
in class AbleLiteral
com.ibm.able.data.AbleLiteral
public java.lang.String arlCRdString()
arlCRdString
in class AbleLiteral
public java.lang.String xmlCRdString()
xmlCRdString
in class AbleLiteral
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 AbleLiteral
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 AbleLiteral
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 AbleLiteral
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 AbleLiteral
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 AbleLiteral
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 bitwiseXOR(AbleRd theRhs) throws AbleDataException
"^" is used for bitwise or logical XOR.
bitwiseXOR
in class AbleLiteral
theRhs
- The right-hand side of the operation.
AbleDataException
- If the right-hand side cannot be converted (if
necessary) and compared to this data object.public boolean equals(java.lang.Object theOtherObject)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class AbleLiteral
public java.lang.String traceString(int theTraceStringFlavor)
traceString
in class AbleLiteral
theFlavor
- An Able.TraceStringFlavor value.
public int getDataType()
AbleLiteral
getDataType
in class AbleLiteral
AbleRd.getDataType()
|
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 |