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