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 aMatrixIndex
record class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Indicates whether some other object is "equal to" this one.int
hashCode()
Returns a hash code value for this object.int
i()
Returns the value of thei
record component.int
j()
Returns the value of thej
record component.static MatrixIndex
of
(int i, int j) final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
MatrixIndex
public MatrixIndex(int i, int j) Creates an instance of aMatrixIndex
record class.- Parameters:
i
- the value for thei
record componentj
- the value for thej
record 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 thei
record component.- Returns:
- the value of the
i
record component
-
j
public int j()Returns the value of thej
record component.- Returns:
- the value of the
j
record component
-