V - the type of elements maintained by this Collectionpublic class IntObjectImmutablePair<V> extends java.lang.Object implements IntObjectPair<V>
EMPTY| Constructor and Description |
|---|
IntObjectImmutablePair()
Default Constructor
|
IntObjectImmutablePair(int key,
V value)
Key/Value Constructur
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
int |
getIntKey() |
V |
getValue() |
int |
hashCode() |
IntObjectPair<V> |
set(int key,
V value)
Sets key and value of the Pair
|
IntObjectPair<V> |
setIntKey(int key)
Sets the Key of the Pair.
|
IntObjectPair<V> |
setValue(V value)
Sets the Value of the Pair.
|
IntObjectPair<V> |
shallowCopy()
Clones the Pair if it is mutable.
|
java.lang.String |
toString() |
mutable, mutable, mutable, mutableKey, mutableValue, of, of, of, ofKey, ofValuepublic IntObjectImmutablePair()
public IntObjectImmutablePair(int key,
V value)
key - the key of the Pairvalue - the value of the Pairpublic IntObjectPair<V> setIntKey(int key)
IntObjectPairsetIntKey in interface IntObjectPair<V>key - the key that should be set.public int getIntKey()
getIntKey in interface IntObjectPair<V>public IntObjectPair<V> setValue(V value)
IntObjectPairsetValue in interface IntObjectPair<V>value - the value that should be set.public V getValue()
getValue in interface IntObjectPair<V>public IntObjectPair<V> set(int key, V value)
IntObjectPairset in interface IntObjectPair<V>key - the key that should be set.value - the value that should be set.public IntObjectPair<V> shallowCopy()
IntObjectPairshallowCopy in interface IntObjectPair<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