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 V
getItem()
Get the actual contents of the node.K
getKey()
Get the key for the node.boolean
isVisited()
void
mark()
void
setItem(V value)
Set the contents of the node.void
setValue(K key, V value)
Set the key and value associated with this node.String
toString()
void
unMark()
-
-
-
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:GraphNode
Set the contents of the node.
-
setValue
public void setValue(K key, V value)
Description copied from interface:GraphNode
Set the key and value associated with this node.
-
-