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