ModeShape Distribution 3.0.0.Beta4

org.modeshape.jcr.query.model
Class Or

java.lang.Object
  extended by org.modeshape.jcr.query.model.Or
All Implemented Interfaces:
Serializable, Constraint, Or, LanguageObject, Visitable

@Immutable
public class Or
extends Object
implements Constraint, Or

A constraint that evaluates to true when either of the other constraints evaluates to true.

See Also:
Serialized Form

Constructor Summary
Or(Constraint left, Constraint right)
          Create a constraint that evaluates to true if either of the two supplied constraints evaluates to true.
 
Method Summary
 void accept(Visitor visitor)
          Accept the supplied visitor, which should call back to the visitor to complete the double-dispatch operation.
 boolean equals(Object obj)
           
 Constraint getConstraint1()
           
 Constraint getConstraint2()
           
 int hashCode()
           
 Constraint left()
          Get the left-hand constraint.
 Constraint right()
          Get the right-hand constraint.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Or

public Or(Constraint left,
          Constraint right)
Create a constraint that evaluates to true if either of the two supplied constraints evaluates to true.

Parameters:
left - the left constraint
right - the right constraint
Throws:
IllegalArgumentException - if the left or right constraints are null
Method Detail

left

public Constraint left()
Get the left-hand constraint.

Returns:
the left-hand constraint; never null

right

public Constraint right()
Get the right-hand constraint.

Returns:
the right-hand constraint; never null

getConstraint1

public Constraint getConstraint1()
Specified by:
getConstraint1 in interface Or

getConstraint2

public Constraint getConstraint2()
Specified by:
getConstraint2 in interface Or

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

accept

public void accept(Visitor visitor)
Description copied from interface: Visitable
Accept the supplied visitor, which should call back to the visitor to complete the double-dispatch operation.

Specified by:
accept in interface Visitable
Parameters:
visitor - the visitor; never null

ModeShape Distribution 3.0.0.Beta4

Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.