Class AbstractGraphNode<K,V>
- java.lang.Object
-
- ubic.basecode.dataStructure.Visitable
-
- ubic.basecode.dataStructure.graph.AbstractGraphNode<K,V>
-
- All Implemented Interfaces:
GraphNode<K,V>
- Direct Known Subclasses:
DirectedGraphNode,UndirectedGraphNode
public abstract class AbstractGraphNode<K,V> extends Visitable implements GraphNode<K,V>
- Author:
- Paul Pavlidis
-
-
Constructor Summary
Constructors Constructor Description AbstractGraphNode(K key)Create a new node when given only a key.AbstractGraphNode(K key, V value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VgetItem()Get the actual contents of the node.KgetKey()Get the key for the node.booleanisVisited()voidmark()voidsetItem(V value)Set the contents of the node.voidsetValue(K key, V value)Set the key and value associated with this node.StringtoString()voidunMark()
-
-
-
Method Detail
-
getItem
public V getItem()
Get the actual contents of the node.
-
getKey
public K getKey()
Get the key for the node.
-
setItem
public void setItem(V value)
Description copied from interface:GraphNodeSet the contents of the node.
-
setValue
public void setValue(K key, V value)
Description copied from interface:GraphNodeSet the key and value associated with this node.
-
-