public interface LongIntPair extends Pair<java.lang.Long,java.lang.Integer>
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 LongIntPair |
first(long l)
Sets the left element of this pair (optional operation).
|
default LongIntPair |
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 LongIntPair |
key(long l)
Sets the left element of this pair (optional operation).
|
default LongIntPair |
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 LongIntPair |
left(long l)
Sets the left element of this pair (optional operation).
|
default LongIntPair |
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<LongIntPair> |
lexComparator()
Returns a lexicographical comparator for pairs.
|
static LongIntPair |
of(long 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 LongIntPair |
right(int r)
Sets the right element of this pair (optional operation).
|
default LongIntPair |
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 LongIntPair |
second(int r)
Sets the right element of this pair (optional operation).
|
default LongIntPair |
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 LongIntPair |
value(int r)
Sets the right element of this pair (optional operation).
|
default LongIntPair |
value(java.lang.Integer l)
Deprecated.
Please use the corresponding type-specific method instead.
|
default int |
valueInt()
Returns the right element of this pair.
|
long leftLong()
@Deprecated default java.lang.Long left()
default LongIntPair left(long l)
l
- a new value for the left element.UnsupportedOperationException
.@Deprecated default LongIntPair left(java.lang.Long l)
default long firstLong()
left()
.@Deprecated default java.lang.Long first()
default LongIntPair first(long l)
l
- a new value for the left element.Pair.left(Object)
.@Deprecated default LongIntPair first(java.lang.Long l)
default long keyLong()
left()
.@Deprecated default java.lang.Long key()
default LongIntPair key(long l)
l
- a new value for the left element.Pair.left(Object)
.@Deprecated default LongIntPair key(java.lang.Long l)
Pair
int rightInt()
@Deprecated default java.lang.Integer right()
default LongIntPair right(int r)
r
- a new value for the right element.UnsupportedOperationException
.@Deprecated default LongIntPair right(java.lang.Integer l)
default int secondInt()
right()
.@Deprecated default java.lang.Integer second()
default LongIntPair second(int r)
r
- a new value for the right element.Pair.right(Object)
.@Deprecated default LongIntPair second(java.lang.Integer l)
default int valueInt()
right()
.@Deprecated default java.lang.Integer value()
default LongIntPair value(int r)
r
- a new value for the right element.Pair.right(Object)
.@Deprecated default LongIntPair value(java.lang.Integer l)
static LongIntPair of(long left, int right)
Pair
with given left and right value.static java.util.Comparator<LongIntPair> 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.Integer>