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