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