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