Package jadex.micro.gobble
Record Class Board.Move
java.lang.Object
java.lang.Record
jadex.micro.gobble.Board.Move
- Enclosing class:
Board
-
Constructor Summary
ConstructorsConstructorDescriptionMove
(int row, int col, int size, int player) Creates an instance of aMove
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
col()
Returns the value of thecol
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.int
player()
Returns the value of theplayer
record component.int
row()
Returns the value of therow
record component.int
size()
Returns the value of thesize
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
Move
public Move(int row, int col, int size, int player) Creates an instance of aMove
record class.- Parameters:
row
- the value for therow
record componentcol
- the value for thecol
record componentsize
- the value for thesize
record componentplayer
- the value for theplayer
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 '=='. -
row
public int row()Returns the value of therow
record component.- Returns:
- the value of the
row
record component
-
col
public int col()Returns the value of thecol
record component.- Returns:
- the value of the
col
record component
-
size
public int size()Returns the value of thesize
record component.- Returns:
- the value of the
size
record component
-
player
public int player()Returns the value of theplayer
record component.- Returns:
- the value of the
player
record component
-