public class DoubleObjectPair<T>
extends java.lang.Object
double 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 double.| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one.
|
double |
getLeft()
Getter for the left
double value associated with an object of type <T>. |
T |
getRight()
Getter for the right object of type <T> associated with a
double value. |
int |
hashCode()
Generates a hash code based on the hash codes of its primitive
double attribute, and its object of
type <T>. |
static <T> DoubleObjectPair<T> |
of(double left,
T right)
Builds a new instance of this class, with the given
double and <T> values. |
java.lang.String |
toString()
Returns a string representation of the object, containing the primitive
double left attribute and
its associated object of type <T>. |
public static <T> DoubleObjectPair<T> of(double left, T right)
double and <T> values.T - The type of the right attribute for the resulting DoubleObjectPair instance.left - A double value to be paired with an associated object of type <T>.right - An object of type <T>.public double getLeft()
double value associated with an object of type <T>.public T getRight()
double value.public int hashCode()
double attribute, and its object of
type <T>.hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
double 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()
double left attribute and
its associated object of type <T>.toString in class java.lang.Object