Package aQute.bnd.unmodifiable
Class ImmutableMap<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
aQute.bnd.unmodifiable.ImmutableMap<K,V>
- All Implemented Interfaces:
Serializable,Map<K,V>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class(package private) static class(package private) static final class(package private) static final classprivate static final class(package private) static final classNested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final ImmutableMap<?,?> (package private) final Object[](package private) final short[]private static final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()computeIfAbsent(K key, Function<? super K, ? extends V> mappingFunction) computeIfPresent(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) booleancontainsKey(Object key) booleancontainsValue(Object value) entrySet()booleanvoidforEach(BiConsumer<? super K, ? super V> action) private static short[]inthashCode()keySet()private intlinear_probe(Object key) private static intlinear_probe(Object[] entries, short[] hash_bucket, Object key) voidputIfAbsent(K key, V value) private voidbooleanbooleanvoidreplaceAll(BiFunction<? super K, ? super V, ? extends V> function) intsize()values()private ObjectMethods inherited from class java.util.AbstractMap
clone, isEmpty, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
getOrDefault, isEmpty
-
Field Details
-
EMPTY
-
entries
-
hash_bucket
final transient short[] hash_bucket -
serialVersionUID
private static final long serialVersionUID- See Also:
-
-
Constructor Details
-
ImmutableMap
ImmutableMap(Object... entries)
-
-
Method Details
-
hash
-
linear_probe
-
linear_probe
-
size
public int size() -
containsKey
- Specified by:
containsKeyin interfaceMap<K,V> - Overrides:
containsKeyin classAbstractMap<K,V>
-
containsValue
- Specified by:
containsValuein interfaceMap<K,V> - Overrides:
containsValuein classAbstractMap<K,V>
-
get
-
equals
-
hashCode
public int hashCode() -
forEach
-
entrySet
-
keySet
-
values
-
put
-
remove
-
putAll
-
clear
public void clear() -
replaceAll
- Specified by:
replaceAllin interfaceMap<K,V>
-
putIfAbsent
- Specified by:
putIfAbsentin interfaceMap<K,V>
-
remove
-
replace
-
replace
-
computeIfAbsent
- Specified by:
computeIfAbsentin interfaceMap<K,V>
-
computeIfPresent
- Specified by:
computeIfPresentin interfaceMap<K,V>
-
compute
-
merge
-
readObject
- Throws:
InvalidObjectException
-
writeReplace
-