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