|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.sourceforge.esw.service.log.expression.ComparableFilterExpression
A ComparableFilterExpression
ComparableFilterExpression
Field Summary | |
protected boolean |
bFirstID
|
protected boolean |
bSecondID
|
protected java.lang.Comparable |
firstComparable
|
protected java.lang.String |
firstIDValue
|
protected java.lang.Object |
firstValue
|
protected java.lang.Comparable |
secondComparable
|
protected java.lang.String |
secondIDValue
|
protected java.lang.Object |
secondValue
|
Constructor Summary | |
ComparableFilterExpression()
Creates a new ComparableFilterExpression. |
|
ComparableFilterExpression(java.lang.Object fValue,
java.lang.Object sValue)
Creates a new ComparableFilterExpression. |
Method Summary | |
abstract boolean |
checkCompare(int compare)
Checks this compareTo returnValue and see if it satisfies the Expression |
protected void |
checkValues()
|
boolean |
equals(java.lang.Object testObj)
|
boolean |
evaluate(INode aNode)
Evaluates this ComparableFilterExpression in against this INode of data |
abstract java.lang.String |
getCompareTypeString()
Returns a String that describes this Compare Operation |
java.lang.Object |
getFirstValue()
|
protected static java.lang.String |
getID(java.lang.String idString)
|
java.lang.Object |
getSecondValue()
|
protected static boolean |
isID(java.lang.String testID)
|
java.lang.String |
stringEncode()
Encode this expression into a string form. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.Object firstValue
protected java.lang.Object secondValue
protected boolean bFirstID
protected java.lang.String firstIDValue
protected java.lang.Comparable firstComparable
protected boolean bSecondID
protected java.lang.String secondIDValue
protected java.lang.Comparable secondComparable
Constructor Detail |
public ComparableFilterExpression(java.lang.Object fValue, java.lang.Object sValue)
public ComparableFilterExpression()
Method Detail |
public java.lang.Object getFirstValue()
public java.lang.Object getSecondValue()
public boolean evaluate(INode aNode) throws UncomparableExpressionObjectException
The meat of this is that it checks to see if either of the two values are a comparable. If one or both are, it uses the compareTo method of compare to compare the firstValue to the secondValue and see if the first value is greater than the second value. If one of the values is an object, then it uses that object as a key into the aNode to get a comparable value out either something that can directly be used as a Comparable, or passed into the method of the other value which must be a comparable. If neither of the values are a comparable... who knows... bueller... bueller... But most things that would be used as an ID would be a comparable... so maybe we should check for a valid id into the node first... How about we specify some way that a id should be encoded so that we know its an id... the $ID$ type specifier looks to be good... so if either value is a string, then it should pull the value out of the INode, then do comparable stuffs on it...
evaluate
in interface IFilterExpression
infoDatum
- the data to checkpublic java.lang.String stringEncode()
stringEncode
in interface IFilterExpression
public abstract java.lang.String getCompareTypeString()
public abstract boolean checkCompare(int compare)
compare
- the value from the compareTo methodpublic boolean equals(java.lang.Object testObj)
equals
in class java.lang.Object
protected void checkValues()
protected static boolean isID(java.lang.String testID)
protected static java.lang.String getID(java.lang.String idString)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |