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