Interface NodeManager<T>

Type Parameters:
T - the type of nodes this NodeManager tracks.
All Superinterfaces:
Iterable<T>
All Known Subinterfaces:
Graph<T>, LabeledGraph<T,U>, NumberedGraph<T>, NumberedLabeledGraph<T,I>, NumberedNodeManager<T>, OrderedMultiGraph<T>
All Known Implementing Classes:
AbstractGraph, AbstractLabeledGraph, AbstractNumberedGraph, AbstractNumberedLabeledGraph, BasicNodeManager, BasicOrderedMultiGraph, DelegatingGraph, DelegatingNumberedGraph, DelegatingNumberedNodeManager, EdgeFilteredNumberedGraph, ExtensionGraph, InvertedGraph, InvertedNumberedGraph, SelfLoopAddedGraph, SlowNumberedNodeManager, SlowSparseNumberedGraph, SlowSparseNumberedLabeledGraph, SparseNumberedGraph

public interface NodeManager<T> extends Iterable<T>
An object which tracks graph nodes. 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.
  • Method Details

    • iterator

      Iterator<T> iterator()
      Specified by:
      iterator in interface Iterable<T>
      Returns:
      an Iterator of the nodes in this graph
    • getNumberOfNodes

      int getNumberOfNodes()
      Returns:
      the number of nodes in this graph
    • addNode

      void addNode(T n)
      add a node to this graph
    • removeNode

      void removeNode(T n) throws UnsupportedOperationException
      remove a node from this graph
      Throws:
      UnsupportedOperationException
    • containsNode

      boolean containsNode(T n)
      Returns:
      true iff the graph contains the specified node