diva.graph.basic
Class BasicGraphModel.BasicCompositeNode

java.lang.Object
  extended by diva.util.BasicPropertyContainer
      extended by diva.graph.basic.BasicGraphModel.Intermediate
          extended by diva.graph.basic.BasicGraphModel.BasicNode
              extended by diva.graph.basic.BasicGraphModel.BasicCompositeNode
All Implemented Interfaces:
CompositeNode, Graph, Node, PropertyContainer, SemanticObjectContainer
Enclosing class:
BasicGraphModel

private static class BasicGraphModel.BasicCompositeNode
extends BasicGraphModel.BasicNode
implements CompositeNode

A simple composite node implementation.


Field Summary
private  java.util.ArrayList _nodes
          The nodes that this composite node contains.
 
Constructor Summary
BasicGraphModel.BasicCompositeNode(java.lang.Object userObject)
          Construct an empty composite nodes with the given semantic object.
 
Method Summary
 void add(Node n)
           
 int getNodeCount()
          Return a count of the nodes this graph contains.
 java.util.Iterator nodes()
          Return an iterator over the nodes that this graph contains.
 void remove(Node n)
           
 java.lang.String toString()
           
 
Methods inherited from class diva.graph.basic.BasicGraphModel.BasicNode
addInEdge, addOutEdge, getParent, inEdges, outEdges, removeInEdge, removeOutEdge, setParent
 
Methods inherited from class diva.graph.basic.BasicGraphModel.Intermediate
getSemanticObject, setSemanticObject
 
Methods inherited from class diva.util.BasicPropertyContainer
getProperty, properties, propertyNames, removeAllProperties, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface diva.graph.modular.Node
getParent, inEdges, outEdges, setParent
 
Methods inherited from interface diva.util.SemanticObjectContainer
getSemanticObject, setSemanticObject
 
Methods inherited from interface diva.util.PropertyContainer
getProperty, propertyNames, setProperty
 
Methods inherited from interface diva.util.SemanticObjectContainer
getSemanticObject, setSemanticObject
 
Methods inherited from interface diva.util.PropertyContainer
getProperty, propertyNames, setProperty
 

Field Detail

_nodes

private java.util.ArrayList _nodes
The nodes that this composite node contains.

Constructor Detail

BasicGraphModel.BasicCompositeNode

public BasicGraphModel.BasicCompositeNode(java.lang.Object userObject)
Construct an empty composite nodes with the given semantic object.

Method Detail

add

public void add(Node n)

getNodeCount

public int getNodeCount()
Description copied from interface: Graph
Return a count of the nodes this graph contains.

Specified by:
getNodeCount in interface Graph

nodes

public java.util.Iterator nodes()
Description copied from interface: Graph
Return an iterator over the nodes that this graph contains.

Specified by:
nodes in interface Graph

remove

public void remove(Node n)

toString

public java.lang.String toString()
Overrides:
toString in class BasicGraphModel.BasicNode