Package ui
Record Class Tile.TileType
java.lang.Object
java.lang.Record
ui.Tile.TileType
- Enclosing class:
Tile
The type of wall tile, specified by its shape (0=non-wall, 2=wall cap, 3=wall flat, 4=wall
joint) and rotation.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTileType
(int shape, double rotation) Creates an instance of aTileType
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.double
rotation()
Returns the value of therotation
record component.int
shape()
Returns the value of theshape
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
shape
private final int shapeThe field for theshape
record component. -
rotation
private final double rotationThe field for therotation
record component.
-
-
Constructor Details
-
TileType
public TileType(int shape, double rotation) Creates an instance of aTileType
record class.- Parameters:
shape
- the value for theshape
record componentrotation
- the value for therotation
record component
-
-
Method Details
-
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 '=='. -
shape
public int shape()Returns the value of theshape
record component.- Returns:
- the value of the
shape
record component
-
rotation
public double rotation()Returns the value of therotation
record component.- Returns:
- the value of the
rotation
record component
-