org.jboss.dna.graph
Interface Results

All Superinterfaces:
Iterable<Node>
All Known Subinterfaces:
Subgraph

@Immutable
public interface Results
extends Iterable<Node>

A set of nodes returned from a graph, with methods to access the properties and children of the nodes in the result. The Iterable.iterator() method can be used to iterate all over the nodes in the result.

Author:
Randall Hauch

Method Summary
 Graph getGraph()
          Get the graph containing the node.
 Node getNode(Location location)
          Get the node at the supplied location.
 Node getNode(Path path)
          Get the node at the supplied location.
 Node getNode(String path)
          Get the node at the supplied location.
 boolean includes(Location location)
          Return whether this subgraph has a node at the supplied location.
 boolean includes(Path path)
          Return whether this subgraph has a node at the supplied location.
 boolean includes(String path)
          Return whether these results include a node at the supplied location.
 
Methods inherited from interface java.lang.Iterable
iterator
 

Method Detail

getGraph

Graph getGraph()
Get the graph containing the node.

Returns:
the graph

getNode

Node getNode(String path)
Get the node at the supplied location.

Parameters:
path - the path of the node in these results
Returns:
the node, or null if the node is not included in these results

getNode

Node getNode(Path path)
Get the node at the supplied location.

Parameters:
path - the path of the node in these results
Returns:
the node, or null if the node is not included in these results

getNode

Node getNode(Location location)
Get the node at the supplied location.

Parameters:
location - the location of the node
Returns:
the node, or null if the node is not included in these results

includes

boolean includes(String path)
Return whether these results include a node at the supplied location.

Parameters:
path - the path of the node in these results
Returns:
true if this subgraph includes the supplied location, or false otherwise

includes

boolean includes(Path path)
Return whether this subgraph has a node at the supplied location.

Parameters:
path - the path of the node in these results
Returns:
true if these results includes the supplied location, or false otherwise

includes

boolean includes(Location location)
Return whether this subgraph has a node at the supplied location.

Parameters:
location - the location of the node in these results
Returns:
true if these results includes the supplied location, or false otherwise


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