public class FieldNode extends Node implements java.lang.Comparable
Modifier and Type | Field and Description |
---|---|
int |
maxDepth |
(package private) java.util.ArrayList<Vehicle> |
vehicleChildren |
Constructor and Description |
---|
FieldNode(java.lang.String s)
Creates a node with a string identifier.
|
Modifier and Type | Method and Description |
---|---|
void |
addConnection(Node f)
Points this node to another node.
|
void |
addVehicleChild(VehicleNode v)
Does a binary insertion to add a VehicleNode to this FieldNode
|
boolean |
checkVehicleChild(VehicleNode v)
Does a binary search to determine if a VehicleNode belongs to this FieldNode
|
int |
compareTo(FieldNode f)
Compares the name's of the FieldNodes
|
int |
compareTo(java.lang.Object o) |
boolean |
equals(FieldNode f)
Checks if the String is equal to this Node's identifier.
|
boolean |
equals(java.lang.String s)
Checks if the String is equal to this Node's identifier.
|
void |
removeConnection(Node f)
Points this node to another node.
|
getConnections, getName
public final int maxDepth
java.util.ArrayList<Vehicle> vehicleChildren
public FieldNode(java.lang.String s)
s
- Identifier of the node.public void addConnection(Node f)
addConnection
in class Node
f
- public void removeConnection(Node f)
removeConnection
in class Node
f
- public int compareTo(FieldNode f)
f
- public void addVehicleChild(VehicleNode v)
v
- public boolean checkVehicleChild(VehicleNode v)
v
- public boolean equals(FieldNode f)
f
- public boolean equals(java.lang.String s)
f
- public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable