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