Rename getColumn() to getData()

parent e3fc9b87
package org.vadere.simulator.projects.dataprocessing_mtp;
import org.vadere.simulator.control.SimulationState;
import org.vadere.util.geometry.shapes.VPoint;
import java.util.Map;
import java.util.Map.Entry;
import java.util.stream.Collectors;
import org.vadere.simulator.control.SimulationState;
import org.vadere.util.geometry.shapes.VPoint;
public class PedestrianPositionProcessor extends Processor<TimestepPedestrianIdDataKey, VPoint> {
public PedestrianPositionProcessor() {
......@@ -14,7 +14,7 @@ public class PedestrianPositionProcessor extends Processor<TimestepPedestrianIdD
}
public Map<PedestrianIdDataKey, VPoint> getPositions(TimestepDataKey timestepKey) {
return this.getColumn().entrySet().stream()
return this.getData().entrySet().stream()
.filter(e -> e.getKey().equals(timestepKey))
.collect(Collectors.toMap(e -> new PedestrianIdDataKey(e.getKey().getPedestrianId()), e -> e.getValue()));
}
......
package org.vadere.simulator.projects.dataprocessing_mtp;
import org.vadere.simulator.control.SimulationState;
import java.util.Collection;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
import org.vadere.simulator.control.SimulationState;
public abstract class Processor<K extends Comparable<K>, V> {
private int id;
......@@ -26,7 +26,7 @@ public abstract class Processor<K extends Comparable<K>, V> {
this.lastStep = 0;
}
protected Map<K, V> getColumn() {
protected Map<K, V> getData() {
return this.column;
}
......@@ -47,11 +47,11 @@ public abstract class Processor<K extends Comparable<K>, V> {
}
public Set<K> getKeys() {
return this.getColumn().keySet();
return this.getData().keySet();
}
public Collection<V> getValues() {
return this.getColumn().values();
return this.getData().values();
}
public boolean hasValue(final K key) {
......
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