Package smile.util
Record Class IntPair
java.lang.Object
java.lang.Record
smile.util.IntPair
- Record Components:
_1
- the first element._2
- the second element.
A tuple of 2 integer elements.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
_1()
Returns the value of the_1
record component.int
_2()
Returns the value of the_2
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.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
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 '=='. -
_1
public int _1()Returns the value of the_1
record component.- Returns:
- the value of the
_1
record component
-
_2
public int _2()Returns the value of the_2
record component.- Returns:
- the value of the
_2
record component
-