public class IntObjectPair<T>
extends java.lang.Object
int value, with an associated object of type <T>.
Note that, unlike Pair, this class does not implement
Map.Entry, because its left attribute is a primitive int.| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one.
|
int |
getLeft()
Getter for the left
int value associated with an object of type <T>. |
T |
getRight()
Getter for the right object of type <T> associated with an
int value. |
int |
hashCode()
Generates a hash code based on the hash codes of its primitive
int attribute, and its object of
type <T>. |
static <T> IntObjectPair<T> |
of(int left,
T right)
Builds a new instance of this class, with the given
int and <T> values. |
java.lang.String |
toString()
Returns a string representation of the object, containing the primitive
int left attribute and its
associated object of type <T>. |
public static <T> IntObjectPair<T> of(int left, T right)
int and <T> values.T - The type of the right attribute for the resulting IntObjectPair instance.left - An int value to be paired with an associated object of type <T>.right - An object of type <T>.public int getLeft()
int value associated with an object of type <T>.public T getRight()
int value.public int hashCode()
int attribute, and its object of
type <T>.hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
int attribute and its
object of type <T> are equal.equals in class java.lang.Objectobj - The target object with which to compare the current instance.public java.lang.String toString()
int left attribute and its
associated object of type <T>.toString in class java.lang.Object