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 class
private static final class
(package private) static final class
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> -
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 TypeMethodDescriptionvoid
clear()
computeIfAbsent
(K key, Function<? super K, ? extends V> mappingFunction) computeIfPresent
(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) boolean
containsKey
(Object key) boolean
containsValue
(Object value) entrySet()
boolean
void
forEach
(BiConsumer<? super K, ? super V> action) private static short[]
int
hashCode()
keySet()
private int
linear_probe
(Object key) private static int
linear_probe
(Object[] entries, short[] hash_bucket, Object key) void
putIfAbsent
(K key, V value) private void
boolean
boolean
void
replaceAll
(BiFunction<? super K, ? super V, ? extends V> function) int
size()
values()
private Object
Methods inherited from class java.util.AbstractMap
clone, isEmpty, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods 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:
containsKey
in interfaceMap<K,
V> - Overrides:
containsKey
in classAbstractMap<K,
V>
-
containsValue
- Specified by:
containsValue
in interfaceMap<K,
V> - Overrides:
containsValue
in classAbstractMap<K,
V>
-
get
-
equals
-
hashCode
public int hashCode() -
forEach
-
entrySet
-
keySet
-
values
-
put
-
remove
-
putAll
-
clear
public void clear() -
replaceAll
- Specified by:
replaceAll
in interfaceMap<K,
V>
-
putIfAbsent
- Specified by:
putIfAbsent
in interfaceMap<K,
V>
-
remove
-
replace
-
replace
-
computeIfAbsent
- Specified by:
computeIfAbsent
in interfaceMap<K,
V>
-
computeIfPresent
- Specified by:
computeIfPresent
in interfaceMap<K,
V>
-
compute
-
merge
-
readObject
- Throws:
InvalidObjectException
-
writeReplace
-