public interface ObjectLongPair<K> extends Pair<K,java.lang.Long>
Pair
; provides some additional methods that use polymorphism to avoid (un)boxing.Modifier and Type | Method and Description |
---|---|
static <K> java.util.Comparator<ObjectLongPair<K>> |
lexComparator()
Returns a lexicographical comparator for pairs.
|
static <K> ObjectLongPair<K> |
of(K left,
long right)
Returns a new type-specific immutable
Pair with given left and right value. |
default java.lang.Long |
right()
Deprecated.
Please use the corresponding type-specific method instead.
|
default ObjectLongPair<K> |
right(long r)
Sets the right element of this pair (optional operation).
|
default ObjectLongPair<K> |
right(java.lang.Long l)
Deprecated.
Please use the corresponding type-specific method instead.
|
long |
rightLong()
Returns the right element of this pair.
|
default java.lang.Long |
second()
Deprecated.
Please use the corresponding type-specific method instead.
|
default ObjectLongPair<K> |
second(long r)
Sets the right element of this pair (optional operation).
|
default ObjectLongPair<K> |
second(java.lang.Long l)
Deprecated.
Please use the corresponding type-specific method instead.
|
default long |
secondLong()
Returns the right element of this pair.
|
default java.lang.Long |
value()
Deprecated.
Please use the corresponding type-specific method instead.
|
default ObjectLongPair<K> |
value(long r)
Sets the right element of this pair (optional operation).
|
default ObjectLongPair<K> |
value(java.lang.Long l)
Deprecated.
Please use the corresponding type-specific method instead.
|
default long |
valueLong()
Returns the right element of this pair.
|
long rightLong()
@Deprecated default java.lang.Long right()
default ObjectLongPair<K> right(long r)
r
- a new value for the right element.UnsupportedOperationException
.@Deprecated default ObjectLongPair<K> right(java.lang.Long l)
default long secondLong()
right()
.@Deprecated default java.lang.Long second()
default ObjectLongPair<K> second(long r)
r
- a new value for the right element.Pair.right(Object)
.@Deprecated default ObjectLongPair<K> second(java.lang.Long l)
default long valueLong()
right()
.@Deprecated default java.lang.Long value()
default ObjectLongPair<K> value(long r)
r
- a new value for the right element.Pair.right(Object)
.@Deprecated default ObjectLongPair<K> value(java.lang.Long l)
static <K> ObjectLongPair<K> of(K left, long right)
Pair
with given left and right value.static <K> java.util.Comparator<ObjectLongPair<K>> 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<K,java.lang.Long>