public interface DoubleObjectPair<V> extends Pair<java.lang.Double,V>
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 DoubleObjectPair<V> |
first(double l)
Sets the left element of this pair (optional operation).
|
default DoubleObjectPair<V> |
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 DoubleObjectPair<V> |
key(double l)
Sets the left element of this pair (optional operation).
|
default DoubleObjectPair<V> |
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 DoubleObjectPair<V> |
left(double l)
Sets the left element of this pair (optional operation).
|
default DoubleObjectPair<V> |
left(java.lang.Double l)
Deprecated.
Please use the corresponding type-specific method instead.
|
double |
leftDouble()
Returns the left element of this pair.
|
static <V> java.util.Comparator<DoubleObjectPair<V>> |
lexComparator()
Returns a lexicographical comparator for pairs.
|
static <V> DoubleObjectPair<V> |
of(double left,
V right)
Returns a new type-specific immutable
Pair with given left and right value. |
double leftDouble()
@Deprecated default java.lang.Double left()
default DoubleObjectPair<V> left(double l)
l
- a new value for the left element.UnsupportedOperationException
.@Deprecated default DoubleObjectPair<V> left(java.lang.Double l)
default double firstDouble()
left()
.@Deprecated default java.lang.Double first()
default DoubleObjectPair<V> first(double l)
l
- a new value for the left element.Pair.left(Object)
.@Deprecated default DoubleObjectPair<V> first(java.lang.Double l)
default double keyDouble()
left()
.@Deprecated default java.lang.Double key()
default DoubleObjectPair<V> key(double l)
l
- a new value for the left element.Pair.left(Object)
.@Deprecated default DoubleObjectPair<V> key(java.lang.Double l)
Pair
static <V> DoubleObjectPair<V> of(double left, V right)
Pair
with given left and right value.static <V> java.util.Comparator<DoubleObjectPair<V>> 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,V>