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