org.modeshape.graph.query.model
Class SameNode

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

@Immutable
public class SameNode
extends 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)
          
 String getPath()
          Get the absolute path for the node
 SelectorName getSelectorName()
          Get the name of the selector.
 int hashCode()
          
 String toString()
          
 
Methods inherited from class java.lang.Object
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

getSelectorName

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

Returns:
the selector name; never null

getPath

public final String getPath()
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.

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.