query
Class GreaterThan

java.lang.Object
  extended byquery.RelationalOperator
      extended byquery.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.


Field Summary
 
Fields inherited from class query.RelationalOperator
booleanFixedData, fieldName, fixedData, isBoolean
 
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 query.RelationalOperator
compare
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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.
Method Detail

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