Commit a8d671cd authored by Benedikt Zoennchen's avatar Benedikt Zoennchen

remove unused listener.

parent b2e2b4e4
Pipeline #265830 passed with stages
in 138 minutes and 14 seconds
......@@ -46,6 +46,7 @@ public class SimulationCommandHandlerTest extends CommandHandlerTest {
} catch (IOException e) {
throw e;
}
TraCIGetCommand cmd = (TraCIGetCommand) getFirstCommand(TraCIGetCacheHashCommand.build(
TraCICmd.GET_SIMULATION_VALUE, elementID, varID, varType, data));
RemoteManager rm = new TestRemoteManager() {
......
......@@ -45,7 +45,6 @@ public class Topography implements DynamicElementMover{
private IDistanceFunctionCached obstacleDistanceFunction;
private IReachablePointProvider reachablePointProvider;
private List<IMoveDynamicElementListener> moveDynamicElementListeners;
/** A possible empty string identifying a context object. */
private String contextId;
......@@ -184,9 +183,6 @@ public class Topography implements DynamicElementMover{
this.dynamicElementIdCounter = new AtomicInteger(1);
this.contextId = "";
//TODO clone it?
this.moveDynamicElementListeners = new ArrayList<>();
}
/** Clean up a set by removing {@code null}. */
......@@ -198,14 +194,6 @@ public class Topography implements DynamicElementMover{
this(new AttributesTopography(), new AttributesAgent(), new AttributesCar());
}
public void addMoveDynamicElementListener(@NotNull final IMoveDynamicElementListener listener) {
this.moveDynamicElementListeners.add(listener);
}
public void removeMoveDynamicElementListener(@NotNull final IMoveDynamicElementListener listener) {
this.moveDynamicElementListeners.remove(listener);
}
public Rectangle2D.Double getBounds() {
return this.attributes.getBounds();
}
......@@ -391,14 +379,6 @@ public class Topography implements DynamicElementMover{
@Override
public <T extends DynamicElement> void moveElement(T element, final VPoint oldPosition) {
((DynamicElementContainer<T>) getContainer(element.getClass())).moveElement(element, oldPosition);
//TODO: this is an ugly cast
if(element instanceof Pedestrian) {
for(IMoveDynamicElementListener listener : moveDynamicElementListeners) {
listener.moveElement((Pedestrian)element, oldPosition);
}
}
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment