Commit db12ac1c authored by Mario Teixeira Parente's avatar Mario Teixeira Parente
Browse files

Merge branch 'dev/processors' into develop

parents 1709d0cd 8de07160
......@@ -2,7 +2,7 @@ package org.vadere.simulator.projects.dataprocessing.processor;
import org.vadere.simulator.control.SimulationState;
import org.vadere.simulator.projects.dataprocessing.ProcessorManager;
import org.vadere.simulator.projects.dataprocessing.datakey.TimestepPedestrianIdDataKey;
import org.vadere.simulator.projects.dataprocessing.datakey.TimestepPedestrianIdKey;
import org.vadere.state.attributes.processor.AttributesPedestrianDensityProcessor;
import org.vadere.state.scenario.Pedestrian;
......@@ -11,7 +11,7 @@ import org.vadere.state.scenario.Pedestrian;
*
*/
public abstract class PedestrianDensityProcessor extends DataProcessor<TimestepPedestrianIdDataKey, Double> {
public abstract class PedestrianDensityProcessor extends DataProcessor<TimestepPedestrianIdKey, Double> {
private PedestrianPositionProcessor pedPosProc;
private IPointDensityAlgorithm densAlg;
......@@ -25,7 +25,7 @@ public abstract class PedestrianDensityProcessor extends DataProcessor<TimestepP
this.pedPosProc.update(state);
state.getTopography().getElements(Pedestrian.class).stream()
.forEach(ped -> this.addValue(new TimestepPedestrianIdDataKey(state.getStep(), ped.getId()),
.forEach(ped -> this.setValue(new TimestepPedestrianIdKey(state.getStep(), ped.getId()),
this.densAlg.getDensity(ped.getPosition(), state)));
}
......
......@@ -2,7 +2,7 @@ package org.vadere.simulator.projects.dataprocessing.processor;
import org.vadere.simulator.control.SimulationState;
import org.vadere.simulator.projects.dataprocessing.ProcessorManager;
import org.vadere.simulator.projects.dataprocessing.datakey.PedestrianIdDataKey;
import org.vadere.simulator.projects.dataprocessing.datakey.PedestrianIdKey;
import org.vadere.state.scenario.Pedestrian;
import java.util.Collection;
......@@ -12,7 +12,7 @@ import java.util.Collection;
*
*/
public class PedestrianEndTimeProcessor extends DataProcessor<PedestrianIdDataKey, Double> {
public class PedestrianEndTimeProcessor extends DataProcessor<PedestrianIdKey, Double> {
public PedestrianEndTimeProcessor() {
super("endTime");
}
......@@ -33,7 +33,7 @@ public class PedestrianEndTimeProcessor extends DataProcessor<PedestrianIdDataKe
}
private void setValues(Collection<Pedestrian> peds, double value) {
peds.stream().map(ped -> new PedestrianIdDataKey(ped.getId()))
.forEach(key -> this.addValue(key, value));
peds.stream().map(ped -> new PedestrianIdKey(ped.getId()))
.forEach(key -> this.setValue(key, value));
}
}
......@@ -2,7 +2,7 @@ package org.vadere.simulator.projects.dataprocessing.processor;
import org.vadere.simulator.control.SimulationState;
import org.vadere.simulator.projects.dataprocessing.ProcessorManager;
import org.vadere.simulator.projects.dataprocessing.datakey.PedestrianIdDataKey;
import org.vadere.simulator.projects.dataprocessing.datakey.PedestrianIdKey;
import org.vadere.state.attributes.processor.AttributesPedestrianEvacuationTimeProcessor;
import org.vadere.state.scenario.Pedestrian;
......@@ -11,7 +11,7 @@ import org.vadere.state.scenario.Pedestrian;
*
*/
public class PedestrianEvacuationTimeProcessor extends DataProcessor<PedestrianIdDataKey, Double> {
public class PedestrianEvacuationTimeProcessor extends DataProcessor<PedestrianIdKey, Double> {
private PedestrianStartTimeProcessor pedStTimeProc;
public PedestrianEvacuationTimeProcessor() {
......@@ -23,15 +23,15 @@ public class PedestrianEvacuationTimeProcessor extends DataProcessor<PedestrianI
this.pedStTimeProc.update(state);
state.getTopography().getElements(Pedestrian.class).stream()
.map(ped -> new PedestrianIdDataKey(ped.getId()))
.forEach(key -> this.addValue(key, state.getSimTimeInSec() - this.pedStTimeProc.getValue(key)));
.map(ped -> new PedestrianIdKey(ped.getId()))
.forEach(key -> this.setValue(key, state.getSimTimeInSec() - this.pedStTimeProc.getValue(key)));
}
@Override
public void postLoop(final SimulationState state) {
state.getTopography().getElements(Pedestrian.class).stream()
.map(ped -> new PedestrianIdDataKey(ped.getId()))
.forEach(key -> this.addValue(key, Double.NaN));
.map(ped -> new PedestrianIdKey(ped.getId()))
.forEach(key -> this.setValue(key, Double.NaN));
}
@Override
......
......@@ -2,7 +2,7 @@ package org.vadere.simulator.projects.dataprocessing.processor;
import org.vadere.simulator.control.SimulationState;
import org.vadere.simulator.projects.dataprocessing.ProcessorManager;
import org.vadere.simulator.projects.dataprocessing.datakey.TimestepPedestrianIdDataKey;
import org.vadere.simulator.projects.dataprocessing.datakey.TimestepPedestrianIdKey;
import org.vadere.state.attributes.processor.AttributesPedestrianFlowProcessor;
import java.util.Set;
......@@ -13,7 +13,7 @@ import java.util.stream.Collectors;
*
*/
public class PedestrianFlowProcessor extends DataProcessor<TimestepPedestrianIdDataKey, Double> {
public class PedestrianFlowProcessor extends DataProcessor<TimestepPedestrianIdKey, Double> {
private PedestrianVelocityProcessor pedVelProc;
private PedestrianDensityProcessor pedDensProc;
......@@ -26,13 +26,13 @@ public class PedestrianFlowProcessor extends DataProcessor<TimestepPedestrianIdD
this.pedVelProc.update(state);
this.pedDensProc.update(state);
Set<TimestepPedestrianIdDataKey> keys = this.pedVelProc.getKeys().stream().filter(key -> key.getTimestep() == state.getStep()).collect(Collectors.toSet());
Set<TimestepPedestrianIdKey> keys = this.pedVelProc.getKeys().stream().filter(key -> key.getTimestep() == state.getStep()).collect(Collectors.toSet());
for (TimestepPedestrianIdDataKey key : keys) {
for (TimestepPedestrianIdKey key : keys) {
double velocity = this.pedVelProc.getValue(key);
double density = this.pedDensProc.getValue(key);
this.addValue(key, velocity * density);
this.setValue(key, velocity * density);
}
}
......
......@@ -2,8 +2,8 @@ package org.vadere.simulator.projects.dataprocessing.processor;
import org.vadere.simulator.control.SimulationState;
import org.vadere.simulator.projects.dataprocessing.ProcessorManager;
import org.vadere.simulator.projects.dataprocessing.datakey.PedestrianIdDataKey;
import org.vadere.simulator.projects.dataprocessing.datakey.TimestepPedestrianIdDataKey;
import org.vadere.simulator.projects.dataprocessing.datakey.PedestrianIdKey;
import org.vadere.simulator.projects.dataprocessing.datakey.TimestepPedestrianIdKey;
import org.vadere.state.attributes.processor.AttributesPedestrianLastPositionProcessor;
import org.vadere.util.geometry.shapes.VPoint;
......@@ -14,7 +14,7 @@ import java.util.Map;
*
*/
public class PedestrianLastPositionProcessor extends DataProcessor<PedestrianIdDataKey, VPoint> {
public class PedestrianLastPositionProcessor extends DataProcessor<PedestrianIdKey, VPoint> {
private PedestrianPositionProcessor pedPosProc;
public PedestrianLastPositionProcessor() {
......@@ -26,8 +26,8 @@ public class PedestrianLastPositionProcessor extends DataProcessor<PedestrianIdD
this.pedPosProc.update(state);
Map<Integer, VPoint> pedPosMap = state.getPedestrianPositionMap();
pedPosMap.keySet().forEach(pedId -> this.addValue(new PedestrianIdDataKey(pedId),
this.pedPosProc.getValue(new TimestepPedestrianIdDataKey(state.getStep(), pedId))));
pedPosMap.keySet().forEach(pedId -> this.setValue(new PedestrianIdKey(pedId),
this.pedPosProc.getValue(new TimestepPedestrianIdKey(state.getStep(), pedId))));
}
@Override
......@@ -39,7 +39,7 @@ public class PedestrianLastPositionProcessor extends DataProcessor<PedestrianIdD
}
@Override
public String[] toStrings(final PedestrianIdDataKey key) {
public String[] toStrings(final PedestrianIdKey key) {
VPoint pos = this.getValue(key);
return new String[] { Double.toString(pos.x), Double.toString(pos.y) };
......
......@@ -4,7 +4,7 @@ import org.vadere.simulator.control.SimulationState;
import org.vadere.simulator.models.Model;
import org.vadere.simulator.models.osm.OptimalStepsModel;
import org.vadere.simulator.projects.dataprocessing.ProcessorManager;
import org.vadere.simulator.projects.dataprocessing.datakey.TimestepPedestrianIdDataKey;
import org.vadere.simulator.projects.dataprocessing.datakey.TimestepPedestrianIdKey;
import org.vadere.state.scenario.Pedestrian;
import java.util.Collection;
......@@ -14,7 +14,7 @@ import java.util.Collection;
*
*/
public class PedestrianOSMStrideLengthProcessor extends DataProcessor<TimestepPedestrianIdDataKey, Double> {
public class PedestrianOSMStrideLengthProcessor extends DataProcessor<TimestepPedestrianIdKey, Double> {
private OptimalStepsModel osm;
public PedestrianOSMStrideLengthProcessor() {
......@@ -27,7 +27,7 @@ public class PedestrianOSMStrideLengthProcessor extends DataProcessor<TimestepPe
protected void doUpdate(final SimulationState state) {
Collection<Pedestrian> peds = state.getTopography().getElements(Pedestrian.class);
// TODO: if osm != null then compute stridelength
peds.forEach(ped -> this.addValue(new TimestepPedestrianIdDataKey(state.getStep(), ped.getId()), this.osm == null ? Double.NaN : 0.0));
peds.forEach(ped -> this.setValue(new TimestepPedestrianIdKey(state.getStep(), ped.getId()), this.osm == null ? Double.NaN : 0.0));
// TODO Use this comment from the old implementation for this implementation
// @Override
......
......@@ -2,7 +2,7 @@ package org.vadere.simulator.projects.dataprocessing.processor;
import org.vadere.simulator.control.SimulationState;
import org.vadere.simulator.projects.dataprocessing.ProcessorManager;
import org.vadere.simulator.projects.dataprocessing.datakey.TimestepPedestrianIdDataKey;
import org.vadere.simulator.projects.dataprocessing.datakey.TimestepPedestrianIdKey;
import org.vadere.state.attributes.processor.AttributesPedestrianOverlapProcessor;
import org.vadere.util.geometry.shapes.VPoint;
......@@ -13,7 +13,7 @@ import java.util.Map;
*
*/
public class PedestrianOverlapProcessor extends DataProcessor<TimestepPedestrianIdDataKey, Integer> {
public class PedestrianOverlapProcessor extends DataProcessor<TimestepPedestrianIdKey, Integer> {
private double pedRadius;
public PedestrianOverlapProcessor() {
......@@ -24,7 +24,7 @@ public class PedestrianOverlapProcessor extends DataProcessor<TimestepPedestrian
protected void doUpdate(final SimulationState state) {
Map<Integer, VPoint> pedPosMap = state.getPedestrianPositionMap();
pedPosMap.entrySet().forEach(entry -> this.addValue(new TimestepPedestrianIdDataKey(state.getStep(), entry.getKey()), this.calculateOverlaps(pedPosMap, entry.getValue())));
pedPosMap.entrySet().forEach(entry -> this.setValue(new TimestepPedestrianIdKey(state.getStep(), entry.getKey()), this.calculateOverlaps(pedPosMap, entry.getValue())));
}
@Override
......
......@@ -2,9 +2,9 @@ package org.vadere.simulator.projects.dataprocessing.processor;
import org.vadere.simulator.control.SimulationState;
import org.vadere.simulator.projects.dataprocessing.ProcessorManager;
import org.vadere.simulator.projects.dataprocessing.datakey.PedestrianIdDataKey;
import org.vadere.simulator.projects.dataprocessing.datakey.TimestepDataKey;
import org.vadere.simulator.projects.dataprocessing.datakey.TimestepPedestrianIdDataKey;
import org.vadere.simulator.projects.dataprocessing.datakey.PedestrianIdKey;
import org.vadere.simulator.projects.dataprocessing.datakey.TimestepKey;
import org.vadere.simulator.projects.dataprocessing.datakey.TimestepPedestrianIdKey;
import org.vadere.util.geometry.shapes.VPoint;
import java.util.Map;
......@@ -16,16 +16,16 @@ import java.util.stream.Collectors;
*
*/
public class PedestrianPositionProcessor extends DataProcessor<TimestepPedestrianIdDataKey, VPoint> {
public class PedestrianPositionProcessor extends DataProcessor<TimestepPedestrianIdKey, VPoint> {
public PedestrianPositionProcessor() {
super("x", "y");
}
public Map<PedestrianIdDataKey, VPoint> getPositions(TimestepDataKey timestepKey) {
public Map<PedestrianIdKey, VPoint> getPositions(TimestepKey timestepKey) {
return this.getData().entrySet().stream()
.filter(e -> e.getKey().equals(timestepKey))
.collect(Collectors.toMap(e -> new PedestrianIdDataKey(e.getKey().getPedestrianId()), e -> e.getValue()));
.collect(Collectors.toMap(e -> new PedestrianIdKey(e.getKey().getPedestrianId()), e -> e.getValue()));
}
@Override
......@@ -37,7 +37,7 @@ public class PedestrianPositionProcessor extends DataProcessor<TimestepPedestria
Integer pedId = entry.getKey();
VPoint pos = entry.getValue();
this.addValue(new TimestepPedestrianIdDataKey(timeStep, pedId), pos);
this.setValue(new TimestepPedestrianIdKey(timeStep, pedId), pos);
}
}
......@@ -45,7 +45,7 @@ public class PedestrianPositionProcessor extends DataProcessor<TimestepPedestria
public void init(final ProcessorManager manager) {}
@Override
public String[] toStrings(TimestepPedestrianIdDataKey key) {
public String[] toStrings(TimestepPedestrianIdKey key) {
VPoint p = this.getValue(key);
return new String[] { Double.toString(p.x), Double.toString(p.y) };
......
......@@ -2,7 +2,7 @@ package org.vadere.simulator.projects.dataprocessing.processor;
import org.vadere.simulator.control.SimulationState;
import org.vadere.simulator.projects.dataprocessing.ProcessorManager;
import org.vadere.simulator.projects.dataprocessing.datakey.PedestrianIdDataKey;
import org.vadere.simulator.projects.dataprocessing.datakey.PedestrianIdKey;
import org.vadere.state.scenario.Pedestrian;
import org.vadere.state.scenario.Source;
......@@ -13,7 +13,7 @@ import java.util.Collection;
*
*/
public class PedestrianSourceIdProcessor extends DataProcessor<PedestrianIdDataKey, Integer> {
public class PedestrianSourceIdProcessor extends DataProcessor<PedestrianIdKey, Integer> {
public PedestrianSourceIdProcessor() {
super("sourceId");
......@@ -26,7 +26,7 @@ public class PedestrianSourceIdProcessor extends DataProcessor<PedestrianIdDataK
peds.forEach(p -> {
final Source s = p.getSource();
final int sourceId = (s == null) ? -1 : s.getId();
this.addValue(new PedestrianIdDataKey(p.getId()), sourceId);
this.setValue(new PedestrianIdKey(p.getId()), sourceId);
});
}
......
......@@ -2,7 +2,7 @@ package org.vadere.simulator.projects.dataprocessing.processor;
import org.vadere.simulator.control.SimulationState;
import org.vadere.simulator.projects.dataprocessing.ProcessorManager;
import org.vadere.simulator.projects.dataprocessing.datakey.PedestrianIdDataKey;
import org.vadere.simulator.projects.dataprocessing.datakey.PedestrianIdKey;
import org.vadere.state.scenario.Pedestrian;
import java.util.Set;
......@@ -12,7 +12,7 @@ import java.util.Set;
*
*/
public class PedestrianStartTimeProcessor extends DataProcessor<PedestrianIdDataKey, Double> {
public class PedestrianStartTimeProcessor extends DataProcessor<PedestrianIdKey, Double> {
public PedestrianStartTimeProcessor() {
super("startTime");
......@@ -21,7 +21,7 @@ public class PedestrianStartTimeProcessor extends DataProcessor<PedestrianIdData
@Override
protected void doUpdate(final SimulationState state) {
state.getTopography().getElements(Pedestrian.class).stream()
.forEach(ped -> this.update(new PedestrianIdDataKey(ped.getId()), state.getSimTimeInSec()));
.forEach(ped -> this.update(new PedestrianIdKey(ped.getId()), state.getSimTimeInSec()));
}
@Override
......@@ -29,10 +29,10 @@ public class PedestrianStartTimeProcessor extends DataProcessor<PedestrianIdData
// No initialization needed
}
private void update(PedestrianIdDataKey pedIdKey, double startTime) {
Set<PedestrianIdDataKey> keys = this.getKeys();
private void update(PedestrianIdKey pedIdKey, double startTime) {
Set<PedestrianIdKey> keys = this.getKeys();
if (!keys.contains(pedIdKey))
this.addValue(pedIdKey, startTime);
this.setValue(pedIdKey, startTime);
}
}
......@@ -2,7 +2,7 @@ package org.vadere.simulator.projects.dataprocessing.processor;
import org.vadere.simulator.control.SimulationState;
import org.vadere.simulator.projects.dataprocessing.ProcessorManager;
import org.vadere.simulator.projects.dataprocessing.datakey.TimestepPedestrianIdDataKey;
import org.vadere.simulator.projects.dataprocessing.datakey.TimestepPedestrianIdKey;
import org.vadere.state.scenario.Pedestrian;
import java.util.Collection;
......@@ -12,7 +12,7 @@ import java.util.Collection;
*
*/
public class PedestrianTargetIdProcessor extends DataProcessor<TimestepPedestrianIdDataKey, Integer> {
public class PedestrianTargetIdProcessor extends DataProcessor<TimestepPedestrianIdKey, Integer> {
public PedestrianTargetIdProcessor() {
super("targetId");
......@@ -22,7 +22,7 @@ public class PedestrianTargetIdProcessor extends DataProcessor<TimestepPedestria
public void doUpdate(final SimulationState state) {
Collection<Pedestrian> peds = state.getTopography().getElements(Pedestrian.class);
peds.forEach(p -> this.addValue(new TimestepPedestrianIdDataKey(state.getStep(), p.getId()),
peds.forEach(p -> this.setValue(new TimestepPedestrianIdKey(state.getStep(), p.getId()),
p.getTargets().isEmpty() ? -1 : p.getTargets().getFirst()));
}
......
......@@ -2,7 +2,7 @@ package org.vadere.simulator.projects.dataprocessing.processor;
import org.vadere.simulator.control.SimulationState;
import org.vadere.simulator.projects.dataprocessing.ProcessorManager;
import org.vadere.simulator.projects.dataprocessing.datakey.TimestepPedestrianIdDataKey;
import org.vadere.simulator.projects.dataprocessing.datakey.TimestepPedestrianIdKey;
import org.vadere.state.attributes.processor.AttributesPedestrianVelocityProcessor;
import org.vadere.state.scenario.Pedestrian;
import org.vadere.util.geometry.shapes.VPoint;
......@@ -15,7 +15,7 @@ import java.util.stream.Stream;
*
*/
public class PedestrianVelocityProcessor extends DataProcessor<TimestepPedestrianIdDataKey, Double> {
public class PedestrianVelocityProcessor extends DataProcessor<TimestepPedestrianIdKey, Double> {
private PedestrianPositionProcessor pedPosProc;
private int backSteps;
......@@ -35,7 +35,7 @@ public class PedestrianVelocityProcessor extends DataProcessor<TimestepPedestria
Integer timeStep = state.getStep();
Stream<Integer> pedIds = state.getTopography().getElements(Pedestrian.class).stream().map(ped -> ped.getId());
pedIds.forEach(pedId -> this.addValue(new TimestepPedestrianIdDataKey(timeStep, pedId),
pedIds.forEach(pedId -> this.setValue(new TimestepPedestrianIdKey(timeStep, pedId),
this.getVelocity(timeStep, state.getSimTimeInSec(), pedId)));
if (this.lastSimTimes.size() >= this.backSteps)
......@@ -53,13 +53,13 @@ public class PedestrianVelocityProcessor extends DataProcessor<TimestepPedestria
}
private Double getVelocity(int timeStep, double currentSimTime, int pedId) {
TimestepPedestrianIdDataKey keyBefore = new TimestepPedestrianIdDataKey(timeStep - this.backSteps > 0 ? timeStep - this.backSteps : 1, pedId);
TimestepPedestrianIdKey keyBefore = new TimestepPedestrianIdKey(timeStep - this.backSteps > 0 ? timeStep - this.backSteps : 1, pedId);
if (timeStep <= 1 || !this.pedPosProc.hasValue(keyBefore))
return 0.0; // For performance
VPoint posBefore = this.pedPosProc.getValue(keyBefore);
VPoint posNow = this.pedPosProc.getValue(new TimestepPedestrianIdDataKey(timeStep, pedId));
VPoint posNow = this.pedPosProc.getValue(new TimestepPedestrianIdKey(timeStep, pedId));
return posNow.subtract(posBefore).scalarMultiply(1 / (currentSimTime - this.lastSimTimes.getFirst()))
.distanceToOrigin();
......
......@@ -2,7 +2,7 @@ package org.vadere.simulator.projects.dataprocessing.processor;
import org.vadere.simulator.control.SimulationState;
import org.vadere.simulator.projects.dataprocessing.ProcessorManager;
import org.vadere.simulator.projects.dataprocessing.datakey.PedestrianIdDataKey;
import org.vadere.simulator.projects.dataprocessing.datakey.PedestrianIdKey;
import org.vadere.state.attributes.processor.AttributesPedestrianWaitingEndTimeProcessor;
import org.vadere.util.geometry.shapes.VPoint;
import org.vadere.util.geometry.shapes.VRectangle;
......@@ -14,7 +14,7 @@ import java.util.Map;
*
*/
public class PedestrianWaitingEndTimeProcessor extends DataProcessor<PedestrianIdDataKey, Double> {
public class PedestrianWaitingEndTimeProcessor extends DataProcessor<PedestrianIdKey, Double> {
private VRectangle waitingArea;
public PedestrianWaitingEndTimeProcessor() {
......@@ -30,8 +30,8 @@ public class PedestrianWaitingEndTimeProcessor extends DataProcessor<PedestrianI
VPoint pos = entry.getValue();
if (this.waitingArea.contains(pos)) {
PedestrianIdDataKey key = new PedestrianIdDataKey(pedId);
this.addValue(key, state.getSimTimeInSec());
PedestrianIdKey key = new PedestrianIdKey(pedId);
this.setValue(key, state.getSimTimeInSec());
}
}
}
......
......@@ -2,7 +2,7 @@ package org.vadere.simulator.projects.dataprocessing.processor;
import org.vadere.simulator.control.SimulationState;
import org.vadere.simulator.projects.dataprocessing.ProcessorManager;
import org.vadere.simulator.projects.dataprocessing.datakey.PedestrianIdDataKey;
import org.vadere.simulator.projects.dataprocessing.datakey.PedestrianIdKey;
import org.vadere.state.attributes.processor.AttributesPedestrianWaitingTimeProcessor;
import org.vadere.util.geometry.shapes.VPoint;
import org.vadere.util.geometry.shapes.VRectangle;
......@@ -14,7 +14,7 @@ import java.util.Map;
*
*/
public class PedestrianWaitingTimeProcessor extends DataProcessor<PedestrianIdDataKey, Double> {
public class PedestrianWaitingTimeProcessor extends DataProcessor<PedestrianIdKey, Double> {
private double lastSimTime;
private VRectangle waitingArea;
......@@ -35,8 +35,8 @@ public class PedestrianWaitingTimeProcessor extends DataProcessor<PedestrianIdDa
VPoint pos = entry.getValue();
if (this.waitingArea.contains(pos)) {
PedestrianIdDataKey key = new PedestrianIdDataKey(pedId);
this.addValue(key, (this.hasValue(key) ? this.getValue(key) : 0.0) + dt);
PedestrianIdKey key = new PedestrianIdKey(pedId);
this.setValue(key, (this.hasValue(key) ? this.getValue(key) : 0.0) + dt);
}
}
......
package org.vadere.state.attributes.processor;
public class AttributesFloorFieldProcessor extends AttributesProcessor {
private int targetId;
public int getTargetId() {
return this.targetId;
}
}
package org.vadere.util.data;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
public class FloorFieldGridRow {
private List<Double> values;
public FloorFieldGridRow(int size) {
this.values = IntStream.range(0, size).boxed().map(i -> i*1.0).collect(Collectors.toList());
}
public String[] toStrings() {
return this.values.stream().map(v -> v.toString()).toArray(size -> new String[size]);
}
}
Supports Markdown
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