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 aMoverecord class. -
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.intplayer()Returns the value of theplayerrecord component.introw()Returns the value of therowrecord component.intsize()Returns the value of thesizerecord component.final StringtoString()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 aMoverecord class.- Parameters:
row- the value for therowrecord componentcol- the value for thecolrecord componentsize- the value for thesizerecord componentplayer- the value for theplayerrecord 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 therowrecord component.- Returns:
- the value of the
rowrecord component
-
col
public int col()Returns the value of thecolrecord component.- Returns:
- the value of the
colrecord component
-
size
public int size()Returns the value of thesizerecord component.- Returns:
- the value of the
sizerecord component
-
player
public int player()Returns the value of theplayerrecord component.- Returns:
- the value of the
playerrecord component
-