public class Graph<T>
extends java.lang.Object
implements java.io.Serializable
| Constructor and Description |
|---|
Graph() |
Graph(java.util.Collection<T> nodes) |
Graph(Graph<T> toClone) |
Graph(T node) |
| Modifier and Type | Method and Description |
|---|---|
void |
addEdge(T from,
T to) |
void |
addGraph(Graph<T> g) |
void |
addItem(T item) |
boolean |
equals(java.lang.Object obj) |
java.util.Set<Pair<T,T>> |
getEdges() |
java.util.Set<T> |
getItems() |
java.lang.String |
getLineBasedStringRepresentation()
Creates a new line for each path in the graph where the prefix common to the previous line is omitted.
|
java.lang.String |
getLineBasedStringRepresentation(int offset) |
java.util.Set<T> |
getPredecessors(T item) |
T |
getRoot() |
java.util.Collection<T> |
getSinks() |
java.util.Collection<T> |
getSources() |
java.util.Set<T> |
getSuccessors(T item) |
int |
hashCode() |
boolean |
hasItem(T item) |
boolean |
isEmpty() |
boolean |
isGraphSane() |
void |
removeEdge(T from,
T to) |
void |
removeItem(T item) |
public Graph()
public Graph(T node)
public Graph(java.util.Collection<T> nodes)
public void addItem(T item)
public java.util.Set<T> getItems()
public boolean hasItem(T item)
public void removeItem(T item)
public final java.util.Collection<T> getSources()
public final T getRoot()
public final java.util.Collection<T> getSinks()
public boolean isEmpty()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String getLineBasedStringRepresentation()
public java.lang.String getLineBasedStringRepresentation(int offset)
public boolean isGraphSane()