2.12.2021, 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

Commit a8d671cd authored by Benedikt Zoennchen's avatar Benedikt Zoennchen
Browse files

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 { ...@@ -46,6 +46,7 @@ public class SimulationCommandHandlerTest extends CommandHandlerTest {
} catch (IOException e) { } catch (IOException e) {
throw e; throw e;
} }
TraCIGetCommand cmd = (TraCIGetCommand) getFirstCommand(TraCIGetCacheHashCommand.build( TraCIGetCommand cmd = (TraCIGetCommand) getFirstCommand(TraCIGetCacheHashCommand.build(
TraCICmd.GET_SIMULATION_VALUE, elementID, varID, varType, data)); TraCICmd.GET_SIMULATION_VALUE, elementID, varID, varType, data));
RemoteManager rm = new TestRemoteManager() { RemoteManager rm = new TestRemoteManager() {
......
...@@ -45,7 +45,6 @@ public class Topography implements DynamicElementMover{ ...@@ -45,7 +45,6 @@ public class Topography implements DynamicElementMover{
private IDistanceFunctionCached obstacleDistanceFunction; private IDistanceFunctionCached obstacleDistanceFunction;
private IReachablePointProvider reachablePointProvider; private IReachablePointProvider reachablePointProvider;
private List<IMoveDynamicElementListener> moveDynamicElementListeners;
/** A possible empty string identifying a context object. */ /** A possible empty string identifying a context object. */
private String contextId; private String contextId;
...@@ -184,9 +183,6 @@ public class Topography implements DynamicElementMover{ ...@@ -184,9 +183,6 @@ public class Topography implements DynamicElementMover{
this.dynamicElementIdCounter = new AtomicInteger(1); this.dynamicElementIdCounter = new AtomicInteger(1);
this.contextId = ""; this.contextId = "";
//TODO clone it?
this.moveDynamicElementListeners = new ArrayList<>();
} }
/** Clean up a set by removing {@code null}. */ /** Clean up a set by removing {@code null}. */
...@@ -198,14 +194,6 @@ public class Topography implements DynamicElementMover{ ...@@ -198,14 +194,6 @@ public class Topography implements DynamicElementMover{
this(new AttributesTopography(), new AttributesAgent(), new AttributesCar()); 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() { public Rectangle2D.Double getBounds() {
return this.attributes.getBounds(); return this.attributes.getBounds();
} }
...@@ -391,14 +379,6 @@ public class Topography implements DynamicElementMover{ ...@@ -391,14 +379,6 @@ public class Topography implements DynamicElementMover{
@Override @Override
public <T extends DynamicElement> void moveElement(T element, final VPoint oldPosition) { public <T extends DynamicElement> void moveElement(T element, final VPoint oldPosition) {
((DynamicElementContainer<T>) getContainer(element.getClass())).moveElement(element, 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