public interface DoubleIntPair extends Pair<java.lang.Double,java.lang.Integer>
Pair
; provides some additional methods that use polymorphism to avoid (un)boxing.Modifier and Type | Method and Description |
---|---|
default java.lang.Double |
first()
Deprecated.
Please use the corresponding type-specific method instead.
|
default DoubleIntPair |
first(double l)
Sets the left element of this pair (optional operation).
|
default DoubleIntPair |
first(java.lang.Double l)
Deprecated.
Please use the corresponding type-specific method instead.
|
default double |
firstDouble()
Returns the left element of this pair.
|
default java.lang.Double |
key()
Deprecated.
Please use the corresponding type-specific method instead.
|
default DoubleIntPair |
key(double l)
Sets the left element of this pair (optional operation).
|
default DoubleIntPair |
key(java.lang.Double l)
Deprecated.
|
default double |
keyDouble()
Returns the left element of this pair.
|
default java.lang.Double |
left()
Deprecated.
Please use the corresponding type-specific method instead.
|
default DoubleIntPair |
left(double l)
Sets the left element of this pair (optional operation).
|
default DoubleIntPair |
left(java.lang.Double l)
Deprecated.
Please use the corresponding type-specific method instead.
|
double |
leftDouble()
Returns the left element of this pair.
|
static java.util.Comparator<DoubleIntPair> |
lexComparator()
Returns a lexicographical comparator for pairs.
|
static DoubleIntPair |
of(double left,
int right)
Returns a new type-specific immutable
Pair with given left and right value. |
default java.lang.Integer |
right()
Deprecated.
Please use the corresponding type-specific method instead.
|
default DoubleIntPair |
right(int r)
Sets the right element of this pair (optional operation).
|
default DoubleIntPair |
right(java.lang.Integer l)
Deprecated.
Please use the corresponding type-specific method instead.
|
int |
rightInt()
Returns the right element of this pair.
|
default java.lang.Integer |
second()
Deprecated.
Please use the corresponding type-specific method instead.
|
default DoubleIntPair |
second(int r)
Sets the right element of this pair (optional operation).
|
default DoubleIntPair |
second(java.lang.Integer l)
Deprecated.
Please use the corresponding type-specific method instead.
|
default int |
secondInt()
Returns the right element of this pair.
|
default java.lang.Integer |
value()
Deprecated.
Please use the corresponding type-specific method instead.
|
default DoubleIntPair |
value(int r)
Sets the right element of this pair (optional operation).
|
default DoubleIntPair |
value(java.lang.Integer l)
Deprecated.
Please use the corresponding type-specific method instead.
|
default int |
valueInt()
Returns the right element of this pair.
|
double leftDouble()
@Deprecated default java.lang.Double left()
default DoubleIntPair left(double l)
l
- a new value for the left element.UnsupportedOperationException
.@Deprecated default DoubleIntPair left(java.lang.Double l)
default double firstDouble()
left()
.@Deprecated default java.lang.Double first()
default DoubleIntPair first(double l)
l
- a new value for the left element.Pair.left(Object)
.@Deprecated default DoubleIntPair first(java.lang.Double l)
default double keyDouble()
left()
.@Deprecated default java.lang.Double key()
default DoubleIntPair key(double l)
l
- a new value for the left element.Pair.left(Object)
.@Deprecated default DoubleIntPair key(java.lang.Double l)
Pair
int rightInt()
@Deprecated default java.lang.Integer right()
default DoubleIntPair right(int r)
r
- a new value for the right element.UnsupportedOperationException
.@Deprecated default DoubleIntPair right(java.lang.Integer l)
default int secondInt()
right()
.@Deprecated default java.lang.Integer second()
default DoubleIntPair second(int r)
r
- a new value for the right element.Pair.right(Object)
.@Deprecated default DoubleIntPair second(java.lang.Integer l)
default int valueInt()
right()
.@Deprecated default java.lang.Integer value()
default DoubleIntPair value(int r)
r
- a new value for the right element.Pair.right(Object)
.@Deprecated default DoubleIntPair value(java.lang.Integer l)
static DoubleIntPair of(double left, int right)
Pair
with given left and right value.static java.util.Comparator<DoubleIntPair> lexComparator()
The comparator returned by this method implements lexicographical order. It compares first the left elements: if the result of the comparison is nonzero, it returns said result. Otherwise, this comparator returns the result of the comparison of the right elements.
lexComparator
in interface Pair<java.lang.Double,java.lang.Integer>