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