org.modeshape.graph
Class Graph.GraphNode

java.lang.Object
  extended by org.modeshape.graph.Graph.GraphNode
All Implemented Interfaces:
Iterable<Location>, Node
Enclosing class:
Graph

@Immutable
protected class Graph.GraphNode
extends Object
implements Node


Method Summary
 boolean equals(Object obj)
           
 List<Location> getChildren()
          Get the children of the node.
 List<Path.Segment> getChildrenSegments()
          Get the list of child segments.
 DateTime getExpirationTime()
          Get the time at which this node representation should no longer be used.
 Graph getGraph()
          Get the graph containing the node.
 Location getLocation()
          Get the location of the node.
 Collection<Property> getProperties()
          Get the properties on the node.
 Map<Name,Property> getPropertiesByName()
          Get the map of properties keyed by the property names.
 Property getProperty(Name name)
          Get the property with the supplied name.
 Property getProperty(String nameStr)
          Get the property with the supplied name.
 boolean hasChildren()
          Return whether this node has children.
 int hashCode()
           
 Iterator<Location> iterator()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getLocation

public Location getLocation()
Description copied from interface: Node
Get the location of the node.

Specified by:
getLocation in interface Node
Returns:
the node's location

getExpirationTime

public DateTime getExpirationTime()
Description copied from interface: Node
Get the time at which this node representation should no longer be used.

Specified by:
getExpirationTime in interface Node
Returns:
the expiration time, or null if there is none

getGraph

public Graph getGraph()
Description copied from interface: Node
Get the graph containing the node.

Specified by:
getGraph in interface Node
Returns:
the graph

getProperties

public Collection<Property> getProperties()
Description copied from interface: Node
Get the properties on the node.

Specified by:
getProperties in interface Node
Returns:
the properties

getProperty

public Property getProperty(Name name)
Description copied from interface: Node
Get the property with the supplied name.

Specified by:
getProperty in interface Node
Parameters:
name - the property name
Returns:
the property, or null if there is no property by that name

getProperty

public Property getProperty(String nameStr)
Description copied from interface: Node
Get the property with the supplied name.

Specified by:
getProperty in interface Node
Parameters:
nameStr - the property name
Returns:
the property, or null if there is no property by that name

getPropertiesByName

public Map<Name,Property> getPropertiesByName()
Description copied from interface: Node
Get the map of properties keyed by the property names.

Specified by:
getPropertiesByName in interface Node
Returns:
the map of properties keyed by property name

getChildren

public List<Location> getChildren()
Description copied from interface: Node
Get the children of the node.

Specified by:
getChildren in interface Node
Returns:
the list of locations for each child

hasChildren

public boolean hasChildren()
Description copied from interface: Node
Return whether this node has children.

Specified by:
hasChildren in interface Node
Returns:
true if the node has children, or false otherwise

getChildrenSegments

public List<Path.Segment> getChildrenSegments()
Description copied from interface: Node
Get the list of child segments.

Specified by:
getChildrenSegments in interface Node
Returns:
the list containing a segment for each child

iterator

public Iterator<Location> iterator()
Specified by:
iterator in interface Iterable<Location>

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

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

toString

public String toString()
Overrides:
toString in class Object


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