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