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