public class ShortShortImmutableSortedPair extends ShortShortImmutablePair implements ShortShortSortedPair, java.io.Serializable
SortedPair
; provides some additional methods that use polymorphism to avoid (un)boxing.Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object other) |
static ShortShortImmutableSortedPair |
of(short left,
short right)
Returns a new type-specific immutable
SortedPair with given left and right value. |
java.lang.String |
toString()
Returns a string representation of this sorted pair in the form {l,r}.
|
hashCode, leftShort, rightShort
contains, contains
first, first, first, firstShort, key, key, key, keyShort, left, left, left, leftShort, lexComparator, right, right, right, rightShort, second, second, second, secondShort, value, value, value, valueShort
public static ShortShortImmutableSortedPair of(short left, short right)
SortedPair
with given left and right value.
Note that if left
and right
are in the wrong order, they will be exchanged.
of
in interface Pair<java.lang.Short,java.lang.Short>
of
in interface ShortShortPair
of
in interface ShortShortSortedPair
of
in interface SortedPair<java.lang.Short>
left
- the left value.right
- the right value.public boolean equals(java.lang.Object other)
equals
in class ShortShortImmutablePair
public java.lang.String toString()
toString
in class ShortShortImmutablePair