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