query
Class And

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


Field Summary
 
Fields inherited from class query.LogicalOperator
lhsOperator, rhsOperator
 
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
 

Constructor Detail

And

public And(Operator lhsOperator,
           Operator rhsOperator)
creates new instance of And.

Parameters:
lhsOperator - left hand operator.
rhsOperator - right hand operator.
Method Detail

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