Package it.unimi.dsi.fastutil.objects
Interface ObjectLongPair<K>
-
- All Known Implementing Classes:
ObjectLongImmutablePair,ObjectLongMutablePair
public interface ObjectLongPair<K> extends Pair<K,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 immutablePairwith given left and right value.default Longright()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(Long l)Deprecated.Please use the corresponding type-specific method instead.longrightLong()Returns the right element of this pair.default Longsecond()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(Long l)Deprecated.Please use the corresponding type-specific method instead.default longsecondLong()Returns the right element of this pair.default Longvalue()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(Long l)Deprecated.Please use the corresponding type-specific method instead.default longvalueLong()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 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(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 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(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 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(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 immutablePairwith given left and right value.- Parameters:
left- the left value.right- the right value.
-
-