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