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