V - the keyType of elements maintained by this Collectionpublic class ShortObjectImmutablePair<V> extends java.lang.Object implements ShortObjectPair<V>
EMPTY| Constructor and Description |
|---|
ShortObjectImmutablePair()
Default Constructor
|
ShortObjectImmutablePair(short key,
V value)
Key/Value Constructur
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
short |
getShortKey() |
V |
getValue() |
int |
hashCode() |
ShortObjectPair<V> |
set(short key,
V value)
Sets key and value of the Pair
|
ShortObjectPair<V> |
setShortKey(short key)
Sets the Key of the Pair.
|
ShortObjectPair<V> |
setValue(V value)
Sets the Value of the Pair.
|
ShortObjectPair<V> |
shallowCopy()
Clones the Pair if it is mutable.
|
java.lang.String |
toString() |
mutable, mutable, mutable, mutableKey, mutableValue, of, of, of, ofKey, ofValuepublic ShortObjectImmutablePair()
public ShortObjectImmutablePair(short key,
V value)
key - the key of the Pairvalue - the value of the Pairpublic ShortObjectPair<V> setShortKey(short key)
ShortObjectPairsetShortKey in interface ShortObjectPair<V>key - the key that should be set.public short getShortKey()
getShortKey in interface ShortObjectPair<V>public ShortObjectPair<V> setValue(V value)
ShortObjectPairsetValue in interface ShortObjectPair<V>value - the value that should be set.public V getValue()
getValue in interface ShortObjectPair<V>public ShortObjectPair<V> set(short key, V value)
ShortObjectPairset in interface ShortObjectPair<V>key - the key that should be set.value - the value that should be set.public ShortObjectPair<V> shallowCopy()
ShortObjectPairshallowCopy in interface ShortObjectPair<V>public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object