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

Commit 2ff675e2 authored by Jakob Schöttl's avatar Jakob Schöttl
Browse files

Extract constant for default ID value

parent a765d581
......@@ -17,4 +17,6 @@ package org.vadere.state.attributes;
*
*/
public abstract class Attributes extends DefaultSealable {
/** Used for default ID values of some scenario elements. */
protected static final int ID_NOT_SET = -1;
}
......@@ -14,7 +14,7 @@ public class AttributesSource extends Attributes {
public static final String CONSTANT_DISTRIBUTION = ConstantDistribution.class.getName();
public static final int NO_MAX_SPAWN_NUMBER_TOTAL = -1;
private int id = -1;
private int id = ID_NOT_SET;
/** Shape and position. */
private VShape shape = null;
......
......@@ -19,7 +19,7 @@ import org.vadere.util.geometry.shapes.VShape;
public class AttributesStairs extends Attributes {
private VShape shape = null;
private int id = -1;
private int id = ID_NOT_SET;
private int treadCount = 1;
private Vector2D upwardDirection = new Vector2D(1.0, 0.0);
......
......@@ -10,7 +10,7 @@ import org.vadere.util.geometry.shapes.VShape;
*/
public class AttributesTarget extends Attributes {
private int id = -1;
private int id = ID_NOT_SET;
/**
* True: elements are removed from the simulation after entering.
* False: the target id is removed from the target id list, but the element remains.
......
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