K
- The type of the key.V
- The type of the value which relates to a key.public interface Keys<K,V>
Modifier and Type | Interface and 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 and 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.
|
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 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 © 2017. All rights reserved.