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