Package com.ibm.wala.util.graph
Interface NodeManager<T>
-
- Type Parameters:
T- the type of nodes thisNodeManagertracks.
- All Superinterfaces:
Iterable<T>
- All Known Subinterfaces:
Graph<T>,LabeledGraph<T,U>,NumberedGraph<T>,NumberedLabeledGraph<T,I>,NumberedNodeManager<T>,OrderedMultiGraph<T>,SerializableGraph<T>
- All Known Implementing Classes:
AbstractGraph,AbstractLabeledGraph,AbstractNumberedGraph,AbstractNumberedLabeledGraph,BasicGraph,BasicNodeManager,BasicOrderedMultiGraph,DelegatingGraph,DelegatingNumberedGraph,DelegatingNumberedNodeManager,EdgeFilteredNumberedGraph,ExtensionGraph,InvertedGraph,InvertedNumberedGraph,RandomGraph,RandomGraph.IntegerRandomGraph,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
Collectioninterface, so that it takes less code to implement a newNodeManager.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidaddNode(T n)add a node to this graphbooleancontainsNode(@Nullable T n)intgetNumberOfNodes()default Iterator<T>iterator()voidremoveNode(T n)remove a node from this graphStream<T>stream()-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
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(@Nullable T n)
- Returns:
- true iff the graph contains the specified node
-
-