public class DoubleLongPair extends Object
| Modifier and Type | Field and Description |
|---|---|
double |
first
The first element of the pair
|
static Comparator<DoubleLongPair> |
FIRST_ITEM_ASCENDING_COMPARATOR
Comparator for comparing the first element of a
DoubleLongPair in ascending order. |
static Comparator<DoubleLongPair> |
FIRST_ITEM_DESCENDING_COMPARATOR
Comparator for comparing the first element of a
DoubleLongPair in descending order. |
long |
second
The first element of the pair
|
static Comparator<DoubleLongPair> |
SECOND_ITEM_ASCENDING_COMPARATOR
Comparator for comparing the second element of a
DoubleLongPair in ascending order. |
static Comparator<DoubleLongPair> |
SECOND_ITEM_DESCENDING_COMPARATOR
Comparator for comparing the second element of a
DoubleLongPair in descending order. |
| Constructor and Description |
|---|
DoubleLongPair()
Construct empty pair
|
DoubleLongPair(double f,
long s)
Construct pair with given values
|
| Modifier and Type | Method and Description |
|---|---|
double |
getFirst()
Get the value of the first element
|
static gnu.trove.list.array.TDoubleArrayList |
getFirst(Iterable<DoubleLongPair> data)
Extract the first values from a list of pairs.
|
long |
getSecond()
Get the value of the second element
|
static gnu.trove.list.array.TLongArrayList |
getSecond(Iterable<DoubleLongPair> data)
Extract the second values from a list of pairs.
|
static DoubleLongPair |
pair(double a,
long b)
Create a pair from the given values.
|
void |
setFirst(double first)
Set the value of the first element
|
void |
setSecond(long second)
Set the value of the second element
|
String |
toString() |
public static final Comparator<DoubleLongPair> FIRST_ITEM_ASCENDING_COMPARATOR
DoubleLongPair in ascending order.public static final Comparator<DoubleLongPair> FIRST_ITEM_DESCENDING_COMPARATOR
DoubleLongPair in descending order.public static final Comparator<DoubleLongPair> SECOND_ITEM_ASCENDING_COMPARATOR
DoubleLongPair in ascending order.public static final Comparator<DoubleLongPair> SECOND_ITEM_DESCENDING_COMPARATOR
DoubleLongPair in descending order.public double first
public long second
public DoubleLongPair(double f, long s)
f - first values - second valuepublic DoubleLongPair()
public double getFirst()
public void setFirst(double first)
first - the value to setpublic long getSecond()
public void setSecond(long second)
second - the value to setpublic static DoubleLongPair pair(double a, long b)
a - The first object.b - The second object.public static gnu.trove.list.array.TLongArrayList getSecond(Iterable<DoubleLongPair> data)
data - the datapublic static gnu.trove.list.array.TDoubleArrayList getFirst(Iterable<DoubleLongPair> data)
data - the data