T - the type of elements maintained by this Collectionpublic class ObjectIntImmutablePair<T> extends java.lang.Object implements ObjectIntPair<T>
EMPTY| Constructor and Description |
|---|
ObjectIntImmutablePair()
Default Constructor
|
ObjectIntImmutablePair(T key,
int value)
Key/Value Constructur
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
int |
getIntValue() |
T |
getKey() |
int |
hashCode() |
ObjectIntPair<T> |
set(T key,
int value)
Sets key and value of the Pair
|
ObjectIntPair<T> |
setIntValue(int value)
Sets the Value of the Pair.
|
ObjectIntPair<T> |
setKey(T key)
Sets the Key of the Pair.
|
ObjectIntPair<T> |
shallowCopy()
Clones the Pair if it is mutable.
|
java.lang.String |
toString() |
mutable, mutable, mutable, mutableKey, mutableValue, of, of, of, ofKey, ofValuepublic ObjectIntImmutablePair()
public ObjectIntImmutablePair(T key, int value)
key - the key of the Pairvalue - the value of the Pairpublic ObjectIntPair<T> setKey(T key)
ObjectIntPairsetKey in interface ObjectIntPair<T>key - the key that should be set.public T getKey()
getKey in interface ObjectIntPair<T>public ObjectIntPair<T> setIntValue(int value)
ObjectIntPairsetIntValue in interface ObjectIntPair<T>value - the value that should be set.public int getIntValue()
getIntValue in interface ObjectIntPair<T>public ObjectIntPair<T> set(T key, int value)
ObjectIntPairset in interface ObjectIntPair<T>key - the key that should be set.value - the value that should be set.public ObjectIntPair<T> shallowCopy()
ObjectIntPairshallowCopy in interface ObjectIntPair<T>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