T - the type of nodes this NodeManager tracks.public interface NodeManager<T> extends Iterable<T>
This is effectively a stripped-down collection interface. We choose to avoid using the full
Collection interface, so that it takes less code to implement a new NodeManager.
| Modifier and Type | Method and Description |
|---|---|
void |
addNode(T n)
add a node to this graph
|
boolean |
containsNode(T n) |
int |
getNumberOfNodes() |
default Iterator<T> |
iterator() |
void |
removeNode(T n)
remove a node from this graph
|
Stream<T> |
stream() |
forEach, spliteratorint getNumberOfNodes()
void addNode(T n)
void removeNode(T n) throws UnsupportedOperationException
UnsupportedOperationExceptionboolean containsNode(T n)