public static class TopologicalSort.DirectedGraph<T>
extends java.lang.Object
implements java.lang.Iterable<T>
Constructor and Description |
---|
DirectedGraph() |
Modifier and Type | Method and Description |
---|---|
void |
addEdge(T from,
T to) |
boolean |
addNode(T node) |
boolean |
edgeExists(T from,
T to) |
java.util.Set<T> |
edgesFrom(T from) |
boolean |
isEmpty() |
java.util.Iterator<T> |
iterator() |
void |
removeEdge(T from,
T to) |
int |
size() |
java.lang.String |
toString() |
public boolean addNode(T node)
public java.util.Iterator<T> iterator()
iterator
in interface java.lang.Iterable<T>
public int size()
public boolean isEmpty()
public java.lang.String toString()
toString
in class java.lang.Object