T - the type of elements maintained by this CollectionV - the type of elements maintained by this Collectionpublic interface ObjectObjectPair<T,V>
| Modifier and Type | Field and Description |
|---|---|
static ObjectObjectPair<?,?> |
EMPTY
Empty Reference for Immutable Pairs
|
| Modifier and Type | Method and Description |
|---|---|
T |
getKey() |
V |
getValue() |
static <T,V> ObjectObjectPair<T,V> |
mutable() |
static <T,V> ObjectObjectPair<T,V> |
mutable(ObjectObjectPair<T,V> pair) |
static <T,V> ObjectObjectPair<T,V> |
mutable(T key,
V value) |
static <T,V> ObjectObjectPair<T,V> |
mutableKey(T key) |
static <T,V> ObjectObjectPair<T,V> |
mutableValue(V value) |
static <T,V> ObjectObjectPair<T,V> |
of() |
static <T,V> ObjectObjectPair<T,V> |
of(ObjectObjectPair<T,V> pair) |
static <T,V> ObjectObjectPair<T,V> |
of(T key,
V value) |
static <T,V> ObjectObjectPair<T,V> |
ofKey(T key) |
static <T,V> ObjectObjectPair<T,V> |
ofValue(V value) |
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.
|
static final ObjectObjectPair<?,?> EMPTY
static <T,V> ObjectObjectPair<T,V> of()
T - the type of elements maintained by this CollectionV - the type of elements maintained by this Collectionstatic <T,V> ObjectObjectPair<T,V> ofKey(T key)
T - the type of elements maintained by this CollectionV - the type of elements maintained by this Collectionkey - the key that should be in the pairstatic <T,V> ObjectObjectPair<T,V> ofValue(V value)
T - the type of elements maintained by this CollectionV - the type of elements maintained by this Collectionvalue - the value that should be in the pairstatic <T,V> ObjectObjectPair<T,V> of(T key, V value)
T - the type of elements maintained by this CollectionV - the type of elements maintained by this Collectionkey - the key that should be in the pairvalue - the value that should be in the pairstatic <T,V> ObjectObjectPair<T,V> of(ObjectObjectPair<T,V> pair)
T - the type of elements maintained by this CollectionV - the type of elements maintained by this Collectionpair - the Pair that should be immutably copiedstatic <T,V> ObjectObjectPair<T,V> mutable()
T - the type of elements maintained by this CollectionV - the type of elements maintained by this Collectionstatic <T,V> ObjectObjectPair<T,V> mutableKey(T key)
T - the type of elements maintained by this CollectionV - the type of elements maintained by this Collectionkey - the key that should be in the pairstatic <T,V> ObjectObjectPair<T,V> mutableValue(V value)
T - the type of elements maintained by this CollectionV - the type of elements maintained by this Collectionvalue - the value that should be in the pairstatic <T,V> ObjectObjectPair<T,V> mutable(T key, V value)
T - the type of elements maintained by this CollectionV - the type of elements maintained by this Collectionkey - the key that should be in the pairvalue - the value that should be in the pairstatic <T,V> ObjectObjectPair<T,V> mutable(ObjectObjectPair<T,V> pair)
T - the type of elements maintained by this CollectionV - the type of elements maintained by this Collectionpair - the Pair that should be copiedObjectObjectPair<T,V> setKey(T key)
key - the key that should be set.T getKey()
ObjectObjectPair<T,V> setValue(V value)
value - the value that should be set.V getValue()
ObjectObjectPair<T,V> set(T key, V value)
key - the key that should be set.value - the value that should be set.ObjectObjectPair<T,V> shallowCopy()