public class ShortLongMutablePair extends java.lang.Object implements ShortLongPair, java.io.Serializable
Pair; provides some additional methods that use polymorphism to avoid (un)boxing.| Modifier and Type | Field and Description |
|---|---|
protected short |
left |
protected long |
right |
| Constructor and Description |
|---|
ShortLongMutablePair(short left,
long right)
Creates a new type-specific mutable
Pair with given left and right value. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object other) |
int |
hashCode() |
ShortLongMutablePair |
left(short l)
Sets the left element of this pair (optional operation).
|
short |
leftShort()
Returns the left element of this pair.
|
static ShortLongMutablePair |
of(short left,
long right)
Returns a new type-specific mutable
Pair with given left and right value. |
ShortLongMutablePair |
right(long r)
Sets the right element of this pair (optional operation).
|
long |
rightLong()
Returns the right element of this pair.
|
java.lang.String |
toString()
Returns a string representation of this pair in the form <l,r>.
|
public ShortLongMutablePair(short left,
long right)
Pair with given left and right value.left - the left value.right - the right value.public static ShortLongMutablePair of(short left, long right)
Pair with given left and right value.of in interface it.unimi.dsi.fastutil.Pair<java.lang.Short,java.lang.Long>of in interface ShortLongPairleft - the left value.right - the right value.public short leftShort()
ShortLongPairleftShort in interface ShortLongPairpublic ShortLongMutablePair left(short l)
ShortLongPairleft in interface ShortLongPairl - a new value for the left element.public long rightLong()
ShortLongPairrightLong in interface ShortLongPairpublic ShortLongMutablePair right(long r)
ShortLongPairright in interface ShortLongPairr - a new value for the right element.public boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object