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