Package it.unimi.dsi.fastutil.objects
Interface ObjectBytePair<K>
-
- All Known Implementing Classes:
ObjectByteImmutablePair
,ObjectByteMutablePair
public interface ObjectBytePair<K> extends Pair<K,Byte>
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> ObjectBytePair<K>
of(K left, byte right)
Returns a new type-specific immutablePair
with given left and right value.default Byte
right()
Deprecated.Please use the corresponding type-specific method instead.default ObjectBytePair<K>
right(byte r)
Sets the right element of this pair (optional operation).default ObjectBytePair<K>
right(Byte l)
Deprecated.Please use the corresponding type-specific method instead.byte
rightByte()
Returns the right element of this pair.default Byte
second()
Deprecated.Please use the corresponding type-specific method instead.default ObjectBytePair<K>
second(byte r)
Sets the right element of this pair (optional operation).default ObjectBytePair<K>
second(Byte l)
Deprecated.Please use the corresponding type-specific method instead.default byte
secondByte()
Returns the right element of this pair.default Byte
value()
Deprecated.Please use the corresponding type-specific method instead.default ObjectBytePair<K>
value(byte r)
Sets the right element of this pair (optional operation).default ObjectBytePair<K>
value(Byte l)
Deprecated.Please use the corresponding type-specific method instead.default byte
valueByte()
Returns the right element of this pair.
-
-
-
Method Detail
-
rightByte
byte rightByte()
Returns the right element of this pair.- Returns:
- the right element of this pair.
-
right
@Deprecated default Byte right()
Deprecated.Please use the corresponding type-specific method instead.Returns the right element of this pair.
-
right
default ObjectBytePair<K> right(byte 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 ObjectBytePair<K> right(Byte l)
Deprecated.Please use the corresponding type-specific method instead.Sets the right element of this pair (optional operation).
-
secondByte
default byte secondByte()
Returns the right element of this pair.- Returns:
- the right element of this pair.
- Implementation Notes:
- This implementation delegates to
right()
.
-
second
@Deprecated default Byte second()
Deprecated.Please use the corresponding type-specific method instead.Returns the right element of this pair.
-
second
default ObjectBytePair<K> second(byte 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 ObjectBytePair<K> second(Byte l)
Deprecated.Please use the corresponding type-specific method instead.Sets the right element of this pair (optional operation).
-
valueByte
default byte valueByte()
Returns the right element of this pair.- Returns:
- the right element of this pair.
- Implementation Notes:
- This implementation delegates to
right()
.
-
value
@Deprecated default Byte value()
Deprecated.Please use the corresponding type-specific method instead.Returns the right element of this pair.
-
value
default ObjectBytePair<K> value(byte 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 ObjectBytePair<K> value(Byte l)
Deprecated.Please use the corresponding type-specific method instead.Sets the right element of this pair (optional operation).
-
of
static <K> ObjectBytePair<K> of(K left, byte right)
Returns a new type-specific immutablePair
with given left and right value.- Parameters:
left
- the left value.right
- the right value.
-
-