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