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