public class Node
extends java.lang.Object
Graph| Constructor and Description |
|---|
Node(java.lang.String name)
Constructs a node with that name.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addEdge(Node node)
Adds an outgoing edge
|
java.util.List<Node> |
getEdgesIn()
Gives the list of incoming edges
|
java.util.List<Node> |
getEdgesOut()
Gives the list of outgoing edges
|
java.lang.String |
toString()
Returns the name of the node
|
public void addEdge(Node node)
public java.lang.String toString()
toString in class java.lang.Objectpublic java.util.List<Node> getEdgesOut()
public java.util.List<Node> getEdgesIn()