public abstract class Condition extends java.lang.Object implements ConditionConstants, java.io.Serializable, com.ibm.websphere.cache.Sizeable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
Copyright.
|
AND_LIST_CONDITION, FALSE_VALUE, OPEN_CONDITION, OPERATOR_CONTAINS, OPERATOR_DOES_NOT_CONTAIN, OPERATOR_DOES_NOT_END_WITH, OPERATOR_DOES_NOT_START_WITH, OPERATOR_ENDS_WITH, OPERATOR_EQUAL_TO, OPERATOR_GREATER_THAN, OPERATOR_GREATER_THAN_OR_EQUAL_TO, OPERATOR_LESS_THAN, OPERATOR_LESS_THAN_OR_EQUAL_TO, OPERATOR_NOT_EQUAL_TO, OPERATOR_STARTS_WITH, OR_LIST_CONDITION, SIMPLE_CONDITION, TRUE_CONDITION, TRUE_VALUE, XML_DTD_FRAGMENT, XML_INDENT
Constructor and Description |
---|
Condition()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
abstract java.lang.Object |
clone()
Returns a clone of this condition object.
|
boolean |
equals(java.lang.Object aObject)
Returns true if the specified object is equivalent to this object.
|
abstract boolean |
evaluate(Evaluator evaluator)
This abstract method must be implemented by subclasses of this class.
|
boolean |
getNot()
Returns true if the condition should have the boolean "NOT" operator applied to the condition.
|
long |
getObjectSize()
Returns the estimated footprint size in bytes
of this object and the objects it contains.
|
int |
getType()
Gets the condition type.
|
java.lang.String |
getXMLFragment(java.lang.String indent)
Gets an XML fragment that describes this condition.
|
int |
hashCode()
Returns a hash code for this object.
|
static Condition |
loadConditionFromXML(org.w3c.dom.Element element)
Loads a condition object from an XML element object.
|
void |
setNot(boolean not)
Sets the "NOT" attribute of the condition.
|
public static final java.lang.String COPYRIGHT
public long getObjectSize()
getObjectSize
in interface com.ibm.websphere.cache.Sizeable
public abstract java.lang.Object clone()
clone
in class java.lang.Object
public int getType()
public boolean getNot()
public void setNot(boolean not)
not
- Indicates if the NOT operator should be applied.public abstract boolean evaluate(Evaluator evaluator)
evaluator
- Used to evaluate instances of SimpleCondition and OpenCondition.true
if the condition evaluates to true.public java.lang.String getXMLFragment(java.lang.String indent)
<!ELEMENT orListCondition (not?, (orListCondition | andListCondition | simpleCondition | trueCondition | openCondition)+)>
<!ELEMENT andListCondition (not?, (orListCondition | andListCondition | simpleCondition | trueCondition | openCondition)+)>
<!ELEMENT simpleCondition (not?, variable, operator, value, qualifier*)>
<!ELEMENT openCondition (not?, parameter*)>
<!ATTLIST openCondition name CDATA #REQUIRED>
<!ELEMENT trueCondition (not?)>
<!ELEMENT not EMPTY>
<!ELEMENT variable EMPTY>
<!ATTLIST variable name CDATA #REQUIRED>
<!ELEMENT operator EMPTY>
<!ATTLIST operator name CDATA #REQUIRED>
<!ELEMENT value EMPTY>
<!ATTLIST value data CDATA #REQUIRED>
<!ELEMENT qualifier EMPTY>
<!ATTLIST qualifier name CDATA #REQUIRED>
<!ATTLIST qualifier data CDATA #REQUIRED>
<!ELEMENT parameter (parameter*)>
<!ATTLIST parameter name CDATA #REQUIRED>
<!ATTLIST parameter value CDATA #REQUIRED>
indent
- A string of whitespace that is prefixed to each line of XML produced
by this method.public static Condition loadConditionFromXML(org.w3c.dom.Element element)
element
- An XML Element object.public boolean equals(java.lang.Object aObject)
equals
in class java.lang.Object
aObject
- the specified object.public int hashCode()
hashCode
in class java.lang.Object