Record Class MatrixIndex
java.lang.Object
java.lang.Record
dk.jonaslindstrom.ruffini.common.util.MatrixIndex
-
Constructor Summary
ConstructorsConstructorDescriptionMatrixIndex(int i, int j) Creates an instance of aMatrixIndexrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.inti()Returns the value of theirecord component.intj()Returns the value of thejrecord component.static MatrixIndexof(int i, int j) final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MatrixIndex
public MatrixIndex(int i, int j) Creates an instance of aMatrixIndexrecord class.- Parameters:
i- the value for theirecord componentj- the value for thejrecord component
-
-
Method Details
-
of
-
hashCode
public 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 '=='. -
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. -
i
public int i()Returns the value of theirecord component.- Returns:
- the value of the
irecord component
-
j
public int j()Returns the value of thejrecord component.- Returns:
- the value of the
jrecord component
-