query
Class And
java.lang.Object
query.LogicalOperator
query.And
- All Implemented Interfaces:
- Operator
- public class And
- extends LogicalOperator
This class is a wrapper for and operator ( & ).
Takes two Operators as parameters and returs true
if both the operators return true as result, else returns false.
|
Constructor Summary |
And(Operator lhsOperator,
Operator rhsOperator)
creates new instance of And. |
|
Method Summary |
boolean |
getResult(java.lang.Object object)
returs true if both the operators return true as result,
else returns false. |
java.lang.String |
toString()
returns the logical AND condition being checked using left-hand operator(lhsOperator)
and right-hand operator(rhsOperator) |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
And
public And(Operator lhsOperator,
Operator rhsOperator)
- creates new instance of And.
- Parameters:
lhsOperator - left hand operator.rhsOperator - right hand operator.
getResult
public boolean getResult(java.lang.Object object)
- returs true if both the operators return true as result,
else returns false.
- Parameters:
object - object
- Returns:
- returs true if both the operators return true as result,
else returns false.
toString
public java.lang.String toString()
- returns the logical AND condition being checked using left-hand operator(lhsOperator)
and right-hand operator(rhsOperator)
- Returns:
- String - AND condition