org.modeshape.graph.query.model
Class Or

java.lang.Object
  extended by org.modeshape.graph.query.model.Or
All Implemented Interfaces:
Serializable, Constraint, LanguageObject, Visitable
Direct Known Subclasses:
JcrOr

@Immutable
public class Or
extends Object
implements Constraint

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)
          
 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

toString

public String toString()

Overrides:
toString in class Object
See Also:
Object.toString()

hashCode

public int hashCode()

Overrides:
hashCode in class Object
See Also:
Object.hashCode()

equals

public boolean equals(Object obj)

Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

accept

public void accept(Visitor visitor)
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
See Also:
Visitable.accept(org.modeshape.graph.query.model.Visitor)


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