Package com.luciad.util.collections
Interface ILcdMultiKeyCache
Multi-key cache used by the view to cache data. It allows any type
of key and value to be stored in the cache.
A multi-key cache is a multi-key map that takes ownership of the stored
values. The cache itself can remove entries when needed.
See
ILcdMultiKeyMap
for a detailed description
of the workings of a multi-key map.- Since:
- 2012.0
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionSet
<? extends Map.Entry<Object, ? extends ILcdMultiKeyCache>> Gets the entries of this branch's branch map.Collection
<? extends ILcdMultiKeyCache> Gets the values of this branch's leaf map.Returns the branch that is associated with the given key, ornull
if the branch does not exist.getOrCreateBranch
(Object[] aKeys) Creates and returns a new branch for the given key.Methods inherited from interface com.luciad.util.collections.ILcdMultiKeyMap
branchKeySet, branchSize, clearRecursive, get, put, recursiveLeafKeySet, remove, removeRecursive
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Method Details
-
getBranch
Description copied from interface:ILcdMultiKeyMap
Returns the branch that is associated with the given key, ornull
if the branch does not exist.- Specified by:
getBranch
in interfaceILcdMultiKeyMap<Object,
Object> - Parameters:
aKeys
- the key- Returns:
- the branch associated with the given key, can be
null
if a branch does not exist. - See Also:
-
getOrCreateBranch
Description copied from interface:ILcdMultiKeyMap
Creates and returns a new branch for the given key. A new branch (or sub-branch) is only created when necessary.- Specified by:
getOrCreateBranch
in interfaceILcdMultiKeyMap<Object,
Object> - Parameters:
aKeys
- the key- Returns:
- the branch associated with the given key. This method never returns
null
.
-
branchEntrySet
Set<? extends Map.Entry<Object,? extends ILcdMultiKeyCache>> branchEntrySet()Description copied from interface:ILcdMultiKeyMap
Gets the entries of this branch's branch map.- Specified by:
branchEntrySet
in interfaceILcdMultiKeyMap<Object,
Object> - Returns:
- the branch entry set
-
branchValues
Collection<? extends ILcdMultiKeyCache> branchValues()Description copied from interface:ILcdMultiKeyMap
Gets the values of this branch's leaf map.- Specified by:
branchValues
in interfaceILcdMultiKeyMap<Object,
Object> - Returns:
- the branch value set
-