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