+ this.stepEndTime = stepEndTime;
+ this.stepMode = stepMode;
+ }
+
+ public SimulationPreferences withDuration(double duration) {
+ return new SimulationPreferences(duration, stepEndTime, stepMode);
+ }
+
+ public SimulationPreferences withEndTime(double endTime) {
+ return new SimulationPreferences(stepDuration, endTime, stepMode);
+ }
+
+ public SimulationPreferences withStepMode(StepMode mode) {
+ return new SimulationPreferences(stepDuration, stepEndTime, mode);