K - The type of the key of the elements in this collection.V - The type of the values of the elements in this collection.public interface InheritedCollection<K,V>
| Modifier and Type | Method and Description |
|---|---|
V |
get(K key)
Gets the value of the designated key or
null in case this
collection does not provide a value for this key. |
java.util.Map<K,V> |
getAll()
Gets all elements of this collection (including the inherited ones), mapped
from primary key to the corresponding value.
|
java.util.Map<K,V> |
getAllInherited()
Gets all elements of this collections that are inherited.
|
java.util.Map<K,V> |
getAllOwn()
Gets the elements of this collections that are specific to this collection
and not inherited.
|
V |
getOrCreateOwn(K key)
Gets the value of the designated key (including the parent) which is not inherited or creates a
new one in case this collection does not have a specific value for this key yet.
|
boolean |
isInherited(K key)
Gets whether the element with the designated key is inherited.
|
void |
removeOwnValue(K key)
Removes the element with the designated key from this collection that
overrides an element from a parent entity.
|
void |
set(K key,
V element)
Sets or updates the designated element having the designated key.
|
java.util.Map<K,V> getAll()
java.util.Map<K,V> getAllOwn()
null as value.java.util.Map<K,V> getAllInherited()
V get(K key)
null in case this
collection does not provide a value for this key.key - The key of which to retrieve the value of this collection.null in case this
collection does not provide a value for the key.V getOrCreateOwn(K key)
key - The key of which to retrieve the value of this collection.void set(K key, V element)
null! Removal of an element of a parent
collection is not allowed. key - The key of which to update or set the element.element - The element which to set or update. This must not be
null.boolean isInherited(K key)
null) for
this key.key - The key which to check whether the corresponding value is
inherited.void removeOwnValue(K key)
key - The name which to remove the explicitly set value of and inherit
its from the parent again. This must not be null.