K
- The type of the key.V
- The type of the value which relates to a key.CanonicalMap
, CanonicalMap.CanonicalMapBuilder
, CanonicalMap.MutableCanonicalMap
, Dictionary<K,V>
, Dictionary.MutableDictionary<K,V>
, Dictionary.MutableDictionary.DictionaryBuilder<K,V,B>
, Keys.MutableKeys<K,V>
, Keys.MutableValues<K,V>
, PathMap<T>
, PathMap.MutablePathMap<T>
, PathMap.PathMapBuilder<T>
, PropertiesAccessorMixin
, PropertiesAccessorMixin.PropertiesBuilderMixin<T>
, PropertiesAccessorMixin.PropertiesMixin
, PropertiesAccessorMixin.PropertiesMutatorMixin
CanonicalMapBuilderImpl
, CanonicalMapImpl
, PathMapBuilderImpl
, PathMapImpl
public interface Keys<K,V>
Modifier and Type | Interface | Description |
---|---|---|
static interface |
Keys.MutableKeys<K,V> |
Adds mutable functionality to the
Keys interface. |
static interface |
Keys.MutableValues<K,V> |
Mixin for mutable functionality accompanying the
Keys interface. |
Modifier and Type | Method | Description |
---|---|---|
boolean |
containsKey(Object aKey) |
Tests whether there is an element with the given key.
|
boolean |
containsValue(Object aValue) |
This method is defined for the sake of
Map conformity. |
V |
get(Object aKey) |
Retrieves the element assigned to the given key.
|
default V |
get(Object aKey,
V aDefaultValue) |
Retrieves the element assigned to the given key.
|
Set<K> |
keySet() |
Retrieves a collection containing all the keys found in the elements of
this collection.
|
default V |
use(K aKey) |
Retrieves the element assigned to the given key.
|
Collection<V> |
values() |
Returns a
Collection view of the values related to the contained
keys. |
boolean containsKey(Object aKey)
aKey
- The key for which to test whether there is an element.boolean containsValue(Object aValue)
Map
conformity.
Tests whether the provided value has a key assigned.aValue
- The value to test if a key references this value.V get(Object aKey)
aKey
- The key for which to get the element.default V get(Object aKey, V aDefaultValue)
aKey
- The key for which to get the element.aDefaultValue
- The default value in case the key's value is null.default V use(K aKey) throws KeyNotFoundException
KeyNotFoundException
is thrown.aKey
- The key for which to get the element.KeyNotFoundException
- thrown in case this instance does not
contain the requested element (no such key found in the
collection).Set<K> keySet()
Collection<V> values()
Collection
view of the values related to the contained
keys.Collection
view of the values related to the contained
keys.Copyright © 2018. All rights reserved.