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