diva.graphx.toolbox
Class BasicNodeAdapter

java.lang.Object
  extended by diva.graphx.toolbox.BasicNodeAdapter
All Implemented Interfaces:
NodeAdapter

public class BasicNodeAdapter
extends Object
implements NodeAdapter

A node adapter for BasicEdges.

Version:
$Revision: 1.2 $
Author:
Michael Shilman (michaels@eecs.berkeley.edu), John Reekie (johnr@eecs.berkeley.edu)

Constructor Summary
BasicNodeAdapter(BasicNode root)
          Create a new adapter.
 
Method Summary
 int getNodeCount(Object node)
          Return the number of nodes contained in this graph or composite node.
 Object getParent(Object node)
          Return the graph parent of the given node.
 Iterator inEdges(Object node)
          Return an iterator over the edges coming into the given node.
 boolean isComposite(Object node)
          Return true.
 Iterator nodes(Object node)
          Provide an iterator over the nodes in the given graph or composite node.
 Iterator outEdges(Object node)
          Return an iterator over the edges coming out of the given node.
 void setParent(Object node, Object parent)
          Set the graph parent of the given node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicNodeAdapter

public BasicNodeAdapter(BasicNode root)
Create a new adapter.

Method Detail

inEdges

public Iterator inEdges(Object node)
Return an iterator over the edges coming into the given node.

Specified by:
inEdges in interface NodeAdapter

outEdges

public Iterator outEdges(Object node)
Return an iterator over the edges coming out of the given node.

Specified by:
outEdges in interface NodeAdapter

getParent

public Object getParent(Object node)
Return the graph parent of the given node.

Specified by:
getParent in interface NodeAdapter

setParent

public void setParent(Object node,
                      Object parent)
Set the graph parent of the given node. The parent has the child node added to it also.

Specified by:
setParent in interface NodeAdapter

getNodeCount

public int getNodeCount(Object node)
Return the number of nodes contained in this graph or composite node.

Specified by:
getNodeCount in interface NodeAdapter

isComposite

public boolean isComposite(Object node)
Return true. BasicNodes are always composite.

Specified by:
isComposite in interface NodeAdapter

nodes

public Iterator nodes(Object node)
Provide an iterator over the nodes in the given graph or composite node. This iterator does not necessarily support removal operations.

Specified by:
nodes in interface NodeAdapter


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.