T - the type of elements maintained by this CollectionV - the type of elements maintained by this Collectionpublic class ObjectObjectMutablePair<T,V> extends java.lang.Object implements ObjectObjectPair<T,V>
EMPTY| Constructor and Description |
|---|
ObjectObjectMutablePair()
Default Constructor
|
ObjectObjectMutablePair(T key,
V value)
Key/Value Constructur
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
T |
getKey() |
V |
getValue() |
int |
hashCode() |
ObjectObjectPair<T,V> |
set(T key,
V value)
Sets key and value of the Pair
|
ObjectObjectPair<T,V> |
setKey(T key)
Sets the Key of the Pair.
|
ObjectObjectPair<T,V> |
setValue(V value)
Sets the Value of the Pair.
|
ObjectObjectPair<T,V> |
shallowCopy()
Clones the Pair if it is mutable.
|
java.lang.String |
toString() |
mutable, mutable, mutable, mutableKey, mutableValue, of, of, of, ofKey, ofValuepublic ObjectObjectPair<T,V> setKey(T key)
ObjectObjectPairsetKey in interface ObjectObjectPair<T,V>key - the key that should be set.public T getKey()
getKey in interface ObjectObjectPair<T,V>public ObjectObjectPair<T,V> setValue(V value)
ObjectObjectPairsetValue in interface ObjectObjectPair<T,V>value - the value that should be set.public V getValue()
getValue in interface ObjectObjectPair<T,V>public ObjectObjectPair<T,V> set(T key, V value)
ObjectObjectPairset in interface ObjectObjectPair<T,V>key - the key that should be set.value - the value that should be set.public ObjectObjectPair<T,V> shallowCopy()
ObjectObjectPairshallowCopy in interface ObjectObjectPair<T,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