Q - type of first objectpublic class ObjectFloatPair<Q> extends Object
and float
| Modifier and Type | Field and Description |
|---|---|
Q |
first
The first element of the pair
|
float |
second
The first element of the pair
|
static Comparator<ObjectFloatPair<?>> |
SECOND_ITEM_ASCENDING_COMPARATOR
Comparator for comparing the second element of a
ObjectFloatPair in ascending order. |
static Comparator<ObjectFloatPair<?>> |
SECOND_ITEM_DESCENDING_COMPARATOR
Comparator for comparing the second element of a
ObjectFloatPair in descending order. |
| Constructor and Description |
|---|
ObjectFloatPair()
Construct empty pair
|
ObjectFloatPair(Q f,
float s)
Construct pair with given values
|
| Modifier and Type | Method and Description |
|---|---|
Q |
getFirst()
Get the value of the first element
|
static <Q> List<Q> |
getFirst(Iterable<ObjectFloatPair<Q>> data)
Extract the first objects from a list of pairs.
|
float |
getSecond()
Get the value of the second element
|
static <Q> gnu.trove.list.array.TFloatArrayList |
getSecond(Iterable<ObjectFloatPair<Q>> data)
Extract the second objects from a list of pairs.
|
static <Q> ObjectFloatPair<Q> |
pair(Q q,
float t)
Create a pair from the given objects.
|
void |
setFirst(Q first)
Set the value of the first element
|
void |
setSecond(float second)
Set the value of the second element
|
public static final Comparator<ObjectFloatPair<?>> SECOND_ITEM_ASCENDING_COMPARATOR
ObjectFloatPair in ascending order.public static final Comparator<ObjectFloatPair<?>> SECOND_ITEM_DESCENDING_COMPARATOR
ObjectFloatPair in descending order.public float second
public ObjectFloatPair(Q f, float s)
f - first values - second valuepublic ObjectFloatPair()
public void setFirst(Q first)
first - the value to setpublic float getSecond()
public void setSecond(float second)
second - the value to setpublic static <Q> ObjectFloatPair<Q> pair(Q q, float t)
Q - Type of first object.q - The first object.t - The second object.public static <Q> gnu.trove.list.array.TFloatArrayList getSecond(Iterable<ObjectFloatPair<Q>> data)
Q - type of first objectdata - the datapublic static <Q> List<Q> getFirst(Iterable<ObjectFloatPair<Q>> data)
Q - type of first objectdata - the data