Q
- type of first objectpublic class ObjectBytePair<Q> extends Object
and byte
Modifier and Type | Field and Description |
---|---|
Q |
first
The first element of the pair
|
byte |
second
The first element of the pair
|
static Comparator<ObjectBytePair<?>> |
SECOND_ITEM_ASCENDING_COMPARATOR
Comparator for comparing the second element of a
ObjectBytePair in ascending order. |
static Comparator<ObjectBytePair<?>> |
SECOND_ITEM_DESCENDING_COMPARATOR
Comparator for comparing the second element of a
ObjectBytePair in descending order. |
Constructor and Description |
---|
ObjectBytePair()
Construct empty pair
|
ObjectBytePair(Q f,
byte s)
Construct pair with given values
|
Modifier and Type | Method and Description |
---|---|
Q |
getFirst()
Get the value of the first element
|
static <Q> List<Q> |
getFirst(Iterable<ObjectBytePair<Q>> data)
Extract the first objects from a list of pairs.
|
byte |
getSecond()
Get the value of the second element
|
static <Q> gnu.trove.list.array.TByteArrayList |
getSecond(Iterable<ObjectBytePair<Q>> data)
Extract the second objects from a list of pairs.
|
static <Q> ObjectBytePair<Q> |
pair(Q q,
byte t)
Create a pair from the given objects.
|
void |
setFirst(Q first)
Set the value of the first element
|
void |
setSecond(byte second)
Set the value of the second element
|
public static final Comparator<ObjectBytePair<?>> SECOND_ITEM_ASCENDING_COMPARATOR
ObjectBytePair
in ascending order.public static final Comparator<ObjectBytePair<?>> SECOND_ITEM_DESCENDING_COMPARATOR
ObjectBytePair
in descending order.public byte second
public ObjectBytePair(Q f, byte s)
f
- first values
- second valuepublic ObjectBytePair()
public void setFirst(Q first)
first
- the value to setpublic byte getSecond()
public void setSecond(byte second)
second
- the value to setpublic static <Q> ObjectBytePair<Q> pair(Q q, byte t)
Q
- Type of first object.q
- The first object.t
- The second object.public static <Q> gnu.trove.list.array.TByteArrayList getSecond(Iterable<ObjectBytePair<Q>> data)
Q
- type of first objectdata
- the datapublic static <Q> List<Q> getFirst(Iterable<ObjectBytePair<Q>> data)
Q
- type of first objectdata
- the data