public class ByteDoublePair extends Object
Modifier and Type | Field and Description |
---|---|
byte |
first
The first element of the pair
|
static Comparator<ByteDoublePair> |
FIRST_ITEM_ASCENDING_COMPARATOR
Comparator for comparing the first element of a
ByteDoublePair in ascending order. |
static Comparator<ByteDoublePair> |
FIRST_ITEM_DESCENDING_COMPARATOR
Comparator for comparing the first element of a
ByteDoublePair in descending order. |
double |
second
The first element of the pair
|
static Comparator<ByteDoublePair> |
SECOND_ITEM_ASCENDING_COMPARATOR
Comparator for comparing the second element of a
ByteDoublePair in ascending order. |
static Comparator<ByteDoublePair> |
SECOND_ITEM_DESCENDING_COMPARATOR
Comparator for comparing the second element of a
ByteDoublePair in descending order. |
Constructor and Description |
---|
ByteDoublePair()
Construct empty pair
|
ByteDoublePair(byte f,
double s)
Construct pair with given values
|
Modifier and Type | Method and Description |
---|---|
byte |
getFirst()
Get the value of the first element
|
static gnu.trove.list.array.TByteArrayList |
getFirst(Iterable<ByteDoublePair> data)
Extract the first values from a list of pairs.
|
double |
getSecond()
Get the value of the second element
|
static gnu.trove.list.array.TDoubleArrayList |
getSecond(Iterable<ByteDoublePair> data)
Extract the second values from a list of pairs.
|
static ByteDoublePair |
pair(byte a,
double b)
Create a pair from the given values.
|
void |
setFirst(byte first)
Set the value of the first element
|
void |
setSecond(double second)
Set the value of the second element
|
String |
toString() |
public static final Comparator<ByteDoublePair> FIRST_ITEM_ASCENDING_COMPARATOR
ByteDoublePair
in ascending order.public static final Comparator<ByteDoublePair> FIRST_ITEM_DESCENDING_COMPARATOR
ByteDoublePair
in descending order.public static final Comparator<ByteDoublePair> SECOND_ITEM_ASCENDING_COMPARATOR
ByteDoublePair
in ascending order.public static final Comparator<ByteDoublePair> SECOND_ITEM_DESCENDING_COMPARATOR
ByteDoublePair
in descending order.public byte first
public double second
public ByteDoublePair(byte f, double s)
f
- first values
- second valuepublic ByteDoublePair()
public byte getFirst()
public void setFirst(byte first)
first
- the value to setpublic double getSecond()
public void setSecond(double second)
second
- the value to setpublic static ByteDoublePair pair(byte a, double b)
a
- The first object.b
- The second object.public static gnu.trove.list.array.TDoubleArrayList getSecond(Iterable<ByteDoublePair> data)
data
- the datapublic static gnu.trove.list.array.TByteArrayList getFirst(Iterable<ByteDoublePair> data)
data
- the data