Class AbstractGraph<R extends GraphNode<K,V>,K,V>
- java.lang.Object
-
- ubic.basecode.dataStructure.graph.AbstractGraph<R,K,V>
-
- All Implemented Interfaces:
Graph<R,K,V>
- Direct Known Subclasses:
DirectedGraph
public abstract class AbstractGraph<R extends GraphNode<K,V>,K,V> extends Object implements Graph<R,K,V>
- Author:
- Paul Pavlidis
-
-
Constructor Summary
Constructors Constructor Description AbstractGraph()
AbstractGraph(Set<R> nodes)
Create a new graph from a set of nodes.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
addNode(K key, V value)
abstract void
addNode(R node)
abstract boolean
containsKey(K key)
R
get(K key)
Retrieve a node by key.abstract Map<K,R>
getItems()
V
getNodeContents(K key)
Retrieve the contents of a node by key.void
unmarkAll()
Reset the 'visited' marks of the graph to false.
-
-
-
Method Detail
-
addNode
public abstract void addNode(R node)
- Parameters:
node
- GraphNode
-
containsKey
public abstract boolean containsKey(K key)
-
get
public R get(K key)
Retrieve a node by key. To get the contents of a node use getNodeContents(key)
-
-