Record Class LayerDefinition
java.lang.Object
java.lang.Record
dev.zwazel.internal.game.map.LayerDefinition
public record LayerDefinition(LayerDefinition.LayerType kind, float costModifier, TileDefinition[] tiles)
extends Record
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionLayerDefinition
(LayerDefinition.LayerType kind, float costModifier, TileDefinition[] tiles) Creates an instance of aLayerDefinition
record class. -
Method Summary
Modifier and TypeMethodDescriptionfloat
Returns the value of thecostModifier
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.kind()
Returns the value of thekind
record component.tiles()
Returns the value of thetiles
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
LayerDefinition
Creates an instance of aLayerDefinition
record class.- Parameters:
kind
- the value for thekind
record componentcostModifier
- the value for thecostModifier
record componenttiles
- the value for thetiles
record component
-
-
Method Details
-
toString
-
hashCode
-
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with thecompare
method from their corresponding wrapper classes. -
kind
Returns the value of thekind
record component.- Returns:
- the value of the
kind
record component
-
costModifier
public float costModifier()Returns the value of thecostModifier
record component.- Returns:
- the value of the
costModifier
record component
-
tiles
Returns the value of thetiles
record component.- Returns:
- the value of the
tiles
record component
-