Package hudson.util
Class PackedMap<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
hudson.util.PackedMap<K,V>
- All Implemented Interfaces:
Map<K,
V>
Read-only map implementation that uses less memory than
HashMap
/TreeMap
.
The implementation is backed by a single exact-length array, so this implementation has the following performance characteristics.
- iteration is fast (but creates a lot of short-lived objects.)
- lookup is O(N)
- memory consumption is low
- Author:
- Kohsuke Kawaguchi
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Should persist like a regular map.Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,
V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Method Summary
Methods inherited from class java.util.AbstractMap
clear, clone, containsValue, equals, hashCode, isEmpty, keySet, put, putAll, remove, size, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Method Details
-
of
- Parameters:
src
- Map to copy contents from. Iteration order is preserved.
-
entrySet
-
containsKey
- Specified by:
containsKey
in interfaceMap<K,
V> - Overrides:
containsKey
in classAbstractMap<K,
V>
-
get
-
values
-