org.apache.maven.diagrams.graph_api.impl
Class GraphImpl

java.lang.Object
  extended by org.apache.maven.diagrams.graph_api.impl.GraphImpl
All Implemented Interfaces:
Graph

public class GraphImpl
extends java.lang.Object
implements Graph

Simple Graph implementation (using list of nodes and list of edges)

Author:
ptab

Constructor Summary
GraphImpl(GraphMetadata a_metadata)
           
 
Method Summary
 void addEdge(Edge edge)
           
 void addEdges(java.util.Collection<? extends Edge> edges)
           
 void addNode(Node node)
           
 void addNodes(java.util.Collection<? extends Node> nodes)
           
 Edge getEdge(java.lang.String id)
           
 java.util.LinkedHashMap<java.lang.String,Edge> getEdges()
           
 GraphMetadata getGraphMetadata()
           
 Node getNode(java.lang.String id)
           
 java.util.LinkedHashMap<java.lang.String,Node> getNodes()
           
 void setGraphMetadata(GraphMetadata metadata)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphImpl

public GraphImpl(GraphMetadata a_metadata)
Method Detail

getEdges

public java.util.LinkedHashMap<java.lang.String,Edge> getEdges()
Specified by:
getEdges in interface Graph

getNodes

public java.util.LinkedHashMap<java.lang.String,Node> getNodes()
Specified by:
getNodes in interface Graph

addEdge

public void addEdge(Edge edge)
Specified by:
addEdge in interface Graph

addNode

public void addNode(Node node)
Specified by:
addNode in interface Graph

addNodes

public void addNodes(java.util.Collection<? extends Node> nodes)

addEdges

public void addEdges(java.util.Collection<? extends Edge> edges)

getEdge

public Edge getEdge(java.lang.String id)
Specified by:
getEdge in interface Graph

getNode

public Node getNode(java.lang.String id)
Specified by:
getNode in interface Graph

getGraphMetadata

public GraphMetadata getGraphMetadata()
Specified by:
getGraphMetadata in interface Graph

setGraphMetadata

public void setGraphMetadata(GraphMetadata metadata)


Copyright © 2002-2009 Apache Software Foundation. All Rights Reserved.