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