query
Class GreaterThan
java.lang.Object
query.RelationalOperator
query.GreaterThan
- All Implemented Interfaces:
- Operator
- public class GreaterThan
- extends RelationalOperator
This class is a wrapper for greater than operator ( > ).
Takes field and Comparable object as parameters in the constructor and returs true
if the field of the object is greater than the Comparable object, else returns false.
|
Constructor Summary |
GreaterThan(java.lang.String fieldName,
java.lang.Comparable fixedData)
creates a new GreaterThan object. |
|
Method Summary |
boolean |
getResult(java.lang.Object object)
returns true if the field of the object is greater than the Comparable object, else returns false. |
java.lang.String |
toString()
returns the greater than condition being checked using fieldName and fixedData |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
GreaterThan
public GreaterThan(java.lang.String fieldName,
java.lang.Comparable fixedData)
- creates a new GreaterThan object.
- Parameters:
fieldName - field which has to be compared.fixedData - compare value.
getResult
public boolean getResult(java.lang.Object object)
- returns true if the field of the object is greater than the Comparable object, else returns false.
- Parameters:
object - object
- Returns:
- true if the field of the object is greater than the Comparable object, else returns false.
toString
public java.lang.String toString()
- returns the greater than condition being checked using fieldName and fixedData
- Returns:
- String - Greater than condition