org.modeshape.graph.query.model
Class SameNode

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

@Immutable
public class SameNode
extends Object
implements Constraint

A constraint requiring that the selected node is reachable by the supplied absolute path

See Also:
Serialized Form

Constructor Summary
SameNode(SelectorName selectorName, String path)
          Create a constraint requiring that the node identified by the selector is reachable by the supplied absolute path.
 
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()
          
 String path()
          Get the absolute path for the node
 SelectorName selectorName()
          Get the name of the selector.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SameNode

public SameNode(SelectorName selectorName,
                String path)
Create a constraint requiring that the node identified by the selector is reachable by the supplied absolute path.

Parameters:
selectorName - the name of the selector
path - the absolute path
Throws:
IllegalArgumentException - if the selector name or path are null
Method Detail

selectorName

public final SelectorName selectorName()
Get the name of the selector.

Returns:
the selector name; never null

path

public final String path()
Get the absolute path for the node

Returns:
the absolute path; 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-2011 JBoss, a division of Red Hat. All Rights Reserved.