Package it.unimi.dsi.fastutil.objects
Interface ObjectLongPair<K>
-
- All Superinterfaces:
Pair<K,java.lang.Long>
- All Known Implementing Classes:
ObjectLongImmutablePair
,ObjectLongMutablePair
public interface ObjectLongPair<K> extends Pair<K,java.lang.Long>
A type-specificPair
; provides some additional methods that use polymorphism to avoid (un)boxing.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description static <K> ObjectLongPair<K>
of(K left, long right)
Returns a new type-specific immutablePair
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.
-
-
-
Method Detail
-
rightLong
long rightLong()
Returns the right element of this pair.- Returns:
- the right element of this pair.
-
right
@Deprecated default java.lang.Long right()
Deprecated.Please use the corresponding type-specific method instead.Returns the right element of this pair.
-
right
default ObjectLongPair<K> right(long r)
Sets the right element of this pair (optional operation).- Parameters:
r
- a new value for the right element.- Implementation Notes:
- This implementation throws an
UnsupportedOperationException
.
-
right
@Deprecated default ObjectLongPair<K> right(java.lang.Long l)
Deprecated.Please use the corresponding type-specific method instead.Sets the right element of this pair (optional operation).
-
secondLong
default long secondLong()
Returns the right element of this pair.- Returns:
- the right element of this pair.
- Implementation Notes:
- This implementation delegates to
right()
.
-
second
@Deprecated default java.lang.Long second()
Deprecated.Please use the corresponding type-specific method instead.Returns the right element of this pair.
-
second
default ObjectLongPair<K> second(long r)
Sets the right element of this pair (optional operation).- Parameters:
r
- a new value for the right element.- Implementation Notes:
- This implementation delegates to
Pair.right(Object)
.
-
second
@Deprecated default ObjectLongPair<K> second(java.lang.Long l)
Deprecated.Please use the corresponding type-specific method instead.Sets the right element of this pair (optional operation).
-
valueLong
default long valueLong()
Returns the right element of this pair.- Returns:
- the right element of this pair.
- Implementation Notes:
- This implementation delegates to
right()
.
-
value
@Deprecated default java.lang.Long value()
Deprecated.Please use the corresponding type-specific method instead.Returns the right element of this pair.
-
value
default ObjectLongPair<K> value(long r)
Sets the right element of this pair (optional operation).- Parameters:
r
- a new value for the right element.- Implementation Notes:
- This implementation delegates to
Pair.right(Object)
.
-
value
@Deprecated default ObjectLongPair<K> value(java.lang.Long l)
Deprecated.Please use the corresponding type-specific method instead.Sets the right element of this pair (optional operation).
-
of
static <K> ObjectLongPair<K> of(K left, long right)
Returns a new type-specific immutablePair
with given left and right value.- Parameters:
left
- the left value.right
- the right value.
-
-