public interface ByteShortPair extends Pair<java.lang.Byte,java.lang.Short>
Pair
; provides some additional methods that use polymorphism to avoid (un)boxing.Modifier and Type | Method and Description |
---|---|
default java.lang.Byte |
first()
Deprecated.
Please use the corresponding type-specific method instead.
|
default ByteShortPair |
first(byte l)
Sets the left element of this pair (optional operation).
|
default ByteShortPair |
first(java.lang.Byte l)
Deprecated.
Please use the corresponding type-specific method instead.
|
default byte |
firstByte()
Returns the left element of this pair.
|
default java.lang.Byte |
key()
Deprecated.
Please use the corresponding type-specific method instead.
|
default ByteShortPair |
key(byte l)
Sets the left element of this pair (optional operation).
|
default ByteShortPair |
key(java.lang.Byte l)
Deprecated.
|
default byte |
keyByte()
Returns the left element of this pair.
|
default java.lang.Byte |
left()
Deprecated.
Please use the corresponding type-specific method instead.
|
default ByteShortPair |
left(byte l)
Sets the left element of this pair (optional operation).
|
default ByteShortPair |
left(java.lang.Byte l)
Deprecated.
Please use the corresponding type-specific method instead.
|
byte |
leftByte()
Returns the left element of this pair.
|
static java.util.Comparator<ByteShortPair> |
lexComparator()
Returns a lexicographical comparator for pairs.
|
static ByteShortPair |
of(byte left,
short right)
Returns a new type-specific immutable
Pair with given left and right value. |
default java.lang.Short |
right()
Deprecated.
Please use the corresponding type-specific method instead.
|
default ByteShortPair |
right(short r)
Sets the right element of this pair (optional operation).
|
default ByteShortPair |
right(java.lang.Short l)
Deprecated.
Please use the corresponding type-specific method instead.
|
short |
rightShort()
Returns the right element of this pair.
|
default java.lang.Short |
second()
Deprecated.
Please use the corresponding type-specific method instead.
|
default ByteShortPair |
second(short r)
Sets the right element of this pair (optional operation).
|
default ByteShortPair |
second(java.lang.Short l)
Deprecated.
Please use the corresponding type-specific method instead.
|
default short |
secondShort()
Returns the right element of this pair.
|
default java.lang.Short |
value()
Deprecated.
Please use the corresponding type-specific method instead.
|
default ByteShortPair |
value(short r)
Sets the right element of this pair (optional operation).
|
default ByteShortPair |
value(java.lang.Short l)
Deprecated.
Please use the corresponding type-specific method instead.
|
default short |
valueShort()
Returns the right element of this pair.
|
byte leftByte()
@Deprecated default java.lang.Byte left()
default ByteShortPair left(byte l)
l
- a new value for the left element.UnsupportedOperationException
.@Deprecated default ByteShortPair left(java.lang.Byte l)
default byte firstByte()
left()
.@Deprecated default java.lang.Byte first()
default ByteShortPair first(byte l)
l
- a new value for the left element.Pair.left(Object)
.@Deprecated default ByteShortPair first(java.lang.Byte l)
default byte keyByte()
left()
.@Deprecated default java.lang.Byte key()
default ByteShortPair key(byte l)
l
- a new value for the left element.Pair.left(Object)
.@Deprecated default ByteShortPair key(java.lang.Byte l)
Pair
short rightShort()
@Deprecated default java.lang.Short right()
default ByteShortPair right(short r)
r
- a new value for the right element.UnsupportedOperationException
.@Deprecated default ByteShortPair right(java.lang.Short l)
default short secondShort()
right()
.@Deprecated default java.lang.Short second()
default ByteShortPair second(short r)
r
- a new value for the right element.Pair.right(Object)
.@Deprecated default ByteShortPair second(java.lang.Short l)
default short valueShort()
right()
.@Deprecated default java.lang.Short value()
default ByteShortPair value(short r)
r
- a new value for the right element.Pair.right(Object)
.@Deprecated default ByteShortPair value(java.lang.Short l)
static ByteShortPair of(byte left, short right)
Pair
with given left and right value.static java.util.Comparator<ByteShortPair> 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.Byte,java.lang.Short>