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