query
Class NotEquals
java.lang.Object
query.RelationalOperator
query.NotEquals
- All Implemented Interfaces:
- Operator
- public class NotEquals
- extends RelationalOperator
This class is a wrapper for equals operator ( != ).
Takes field and Comparable objects as parameters in the constructor and returs true
if the field of the object is not equal to the Comparable object, else returns false.
|
Constructor Summary |
NotEquals(java.lang.String fieldName,
boolean booleanFixedData)
creates a new NotEquals object. |
NotEquals(java.lang.String fieldName,
java.lang.Comparable fixedData)
creates a new NotEquals object. |
|
Method Summary |
boolean |
getResult(java.lang.Object object)
returns true if the field of the object is not equal to the Comparable object/boolean data, else returns false. |
java.lang.String |
toString()
returns the inequality condition being checked using fieldName and fixedData |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
NotEquals
public NotEquals(java.lang.String fieldName,
java.lang.Comparable fixedData)
- creates a new NotEquals object.
- Parameters:
fieldName - field which has to be compared.fixedData - compare value.
NotEquals
public NotEquals(java.lang.String fieldName,
boolean booleanFixedData)
- creates a new NotEquals object.
Since Boolean object is not Comparable, use this constructor to check boolean values.
- Parameters:
fieldName - field which has to be compared.booleanFixedData - compare value.
getResult
public boolean getResult(java.lang.Object object)
- returns true if the field of the object is not equal to the Comparable object/boolean data, else returns false.
- Parameters:
object - object
- Returns:
- true if the field of the object is not equal to the Comparable object/boolean data, else returns false.
toString
public java.lang.String toString()
- returns the inequality condition being checked using fieldName and fixedData
- Returns:
- String - Inequality condition