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 aLayerDefinitionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatReturns the value of thecostModifierrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.kind()Returns the value of thekindrecord component.tiles()Returns the value of thetilesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LayerDefinition
Creates an instance of aLayerDefinitionrecord class.- Parameters:
kind- the value for thekindrecord componentcostModifier- the value for thecostModifierrecord componenttiles- the value for thetilesrecord 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 thecomparemethod from their corresponding wrapper classes. -
kind
Returns the value of thekindrecord component.- Returns:
- the value of the
kindrecord component
-
costModifier
public float costModifier()Returns the value of thecostModifierrecord component.- Returns:
- the value of the
costModifierrecord component
-
tiles
Returns the value of thetilesrecord component.- Returns:
- the value of the
tilesrecord component
-