query
Class Or

java.lang.Object
  extended byquery.LogicalOperator
      extended byquery.Or
All Implemented Interfaces:
Operator

public class Or
extends LogicalOperator

This class is a wrapper for or operator ( || ). Takes two Operators as parameters in the constructor and returs true if any one of the operators return true as result, else returns false.


Field Summary
 
Fields inherited from class query.LogicalOperator
lhsOperator, rhsOperator
 
Constructor Summary
Or(Operator lhsOperator, Operator rhsOperator)
          creates new instance of Or
 
Method Summary
 boolean getResult(java.lang.Object object)
          returs true if any one of the operators return true as result, else returns false.
 java.lang.String toString()
          returns the logical OR 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

Or

public Or(Operator lhsOperator,
          Operator rhsOperator)
creates new instance of Or

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

getResult

public boolean getResult(java.lang.Object object)
returs true if any one of the operators return true as result, else returns false.

Parameters:
object - object
Returns:
true if any one of the operators return true as result, else returns false.

toString

public java.lang.String toString()
returns the logical OR condition being checked using left-hand operator(lhsOperator) and right-hand operator(rhsOperator)

Returns:
String - OR condition