Package controller
Record Class ControllerLayer
java.lang.Object
java.lang.Record
controller.ControllerLayer
- All Implemented Interfaces:
Comparable<ControllerLayer>
A class to represent a layer on wich elements are drawn.
BOTTOM: 100 (you can de- or increase this value if you need to)
DEFAULT: 200 (you can de- or increase this value if you need to)
TOP: 300 (you can de- or increase this value if you need to)
ControllerLayers with a higher value are drawn last (i.e. over other entities).
You can construct a user-defined ControllerLayer with any possible integer value.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ControllerLayer
static final int
static final ControllerLayer
static final int
static final ControllerLayer
static final int
-
Constructor Summary
ConstructorsConstructorDescriptionControllerLayer
(int value) Creates an instance of aControllerLayer
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.int
value()
Returns the value of thevalue
record component.
-
Field Details
-
BOTTOM_VALUE
public static final int BOTTOM_VALUE- See Also:
-
DEFAULT_VALUE
public static final int DEFAULT_VALUE- See Also:
-
TOP_VALUE
public static final int TOP_VALUE- See Also:
-
BOTTOM
-
DEFAULT
-
TOP
-
-
Constructor Details
-
ControllerLayer
public ControllerLayer(int value) Creates an instance of aControllerLayer
record class.- Parameters:
value
- the value for thevalue
record component
-
-
Method Details
-
compareTo
- Specified by:
compareTo
in interfaceComparable<ControllerLayer>
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='. -
value
public int value()Returns the value of thevalue
record component.- Returns:
- the value of the
value
record component
-