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