public abstract class AbstractGraphNode<K,V> extends Visitable implements GraphNode<K,V>
Modifier and Type | Field and Description |
---|---|
protected V |
item |
protected K |
key |
protected boolean |
visited |
Constructor and Description |
---|
AbstractGraphNode(K key)
Create a new node when given only a key.
|
AbstractGraphNode(K key,
V value) |
Modifier and Type | Method and 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() |
public AbstractGraphNode(K key)
key
- public V getItem()
public K getKey()
public void setItem(V value)
GraphNode
public void setValue(K key, V value)
GraphNode
Copyright © 2003–2023 UBC Michael Smith Laboratories. All rights reserved.