Record Class Cell
java.lang.Object
java.lang.Record
com.alessiocascini.battleship.client.model.Cell
- Record Components:
row- The vertical index on the gridcol- The horizontal index on the grid
Represents a single coordinate on the battleship grid. This is a data carrier used to identify a
specific position by its row and column.
- Author:
- Alessio Cascini
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcol()Returns the value of thecolrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.introw()Returns the value of therowrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Cell
-
-
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. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
row
-
col
-