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 aTileTyperecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doublerotation()Returns the value of therotationrecord component.intshape()Returns the value of theshaperecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
shape
private final int shapeThe field for theshaperecord component. -
rotation
private final double rotationThe field for therotationrecord component.
-
-
Constructor Details
-
TileType
public TileType(int shape, double rotation) Creates an instance of aTileTyperecord class.- Parameters:
shape- the value for theshaperecord componentrotation- the value for therotationrecord 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 theshaperecord component.- Returns:
- the value of the
shaperecord component
-
rotation
public double rotation()Returns the value of therotationrecord component.- Returns:
- the value of the
rotationrecord component
-