org.modeshape.graph.query.model
Class Or

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

@Immutable
public class Or
extends 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)
          
 Constraint getLeft()
          Get the left-hand constraint.
 Constraint getRight()
          Get the right-hand constraint.
 int hashCode()
          
 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

getLeft

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

Returns:
the left-hand constraint; never null

getRight

public final Constraint getRight()
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.

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.