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