public class ObstacleManager extends Object
Modifier | Constructor and Description |
---|---|
protected |
ObstacleManager() |
Modifier and Type | Method and Description |
---|---|
static void |
addObstacle(Obstacle obstacle,
Topology topology)
Add the given obstacle into the topology
|
static void |
addObstacleListener(ObstacleListener listener,
Topology topology) |
static ObstacleDetector |
getObstacleDetector(Topology topology) |
static ArrayList<Obstacle> |
getObstacles(Topology topology)
List the obstacles that are present inside the topology
|
static void |
init(Topology topology)
Constructor of the class, replace the default class used to check the links by the class that checks if an obstacle prohibit a link.
|
static void |
removeObstacle(Obstacle obstacle,
Topology topology)
Remove the given obstacle from the topology if the obstacle exist in the topology or do nothing
|
static void |
removeObstacleListener(ObstacleListener listener,
Topology topology) |
public static void init(Topology topology)
topology
- The Topology that will contains the obstacles.public static void addObstacle(Obstacle obstacle, Topology topology)
obstacle
- The obstacle that will be added to the topologytopology
- The topologypublic static ArrayList<Obstacle> getObstacles(Topology topology)
topology
- The topologypublic static void removeObstacle(Obstacle obstacle, Topology topology)
public static ObstacleDetector getObstacleDetector(Topology topology)
public static void addObstacleListener(ObstacleListener listener, Topology topology)
public static void removeObstacleListener(ObstacleListener listener, Topology topology)