public abstract class Node
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.util.ArrayList<Node> |
connections |
protected java.lang.String |
name |
Constructor and Description |
---|
Node(java.lang.String s)
Constructs a Node with an identifying String.
|
Modifier and Type | Method and Description |
---|---|
void |
addConnection(Node f)
Points this node to another node.
|
java.util.ArrayList<Node> |
getConnections()
Returns a list of all the connections.
|
java.lang.String |
getName()
Accessor method for the Node's name.
|
void |
removeConnection(Node f)
Removes a connection from this Node.
|
private java.util.ArrayList<Node> connections
protected final java.lang.String name
public Node(java.lang.String s)
s
- public java.lang.String getName()
public void addConnection(Node f)
f
- public void removeConnection(Node f)
f
- public java.util.ArrayList<Node> getConnections()