@Freezable(value=ReadOnlyMap.class) public interface FreezableMap<K,V> extends ReadOnlyMap<K,V>, Map<K,V>, net.digitalid.utility.freezable.FreezableInterface
map that can be frozen.
Please note that the method Map.entrySet() is only supported in a read-only mode.
It is recommended to use only Immutable types for the keys
and ReadOnly or Immutable types for the values.FreezableHashMap,
FreezableLinkedHashMap| Modifier and Type | Method and Description |
|---|---|
@Nonnull net.digitalid.utility.immutable.entry.ReadOnlyEntrySet<K,V> |
entrySet() |
@Nonnull @Frozen ReadOnlyMap<K,V> |
freeze() |
boolean |
isEmpty() |
@Nonnull FreezableSet<K> |
keySet() |
default void |
putAll(@Nonnull ReadOnlyMap<? extends K,? extends V> map)
Adds the entries of the given map to this map.
|
default V |
putIfAbsentOrNullElseReturnPresent(K key,
V value)
Associates the given value with the given key, if the
given key is not already associated with a value or null.
|
default void |
removeAll(@Nonnull Collection<?> keys)
Removes the given keys from this map.
|
default void |
removeAll(@Nonnull net.digitalid.utility.functional.iterables.FiniteIterable<?> keys)
Removes the given keys from this map.
|
default void |
removeAll(@Nonnull FreezableCollection<?> keys)
Removes the given keys from this map.
|
default void |
removeAll(@Nonnull ReadOnlyMap<? extends K,? extends V> map)
Removes the keys of the given map from this map.
|
@Nonnull FreezableCollection<V> |
values() |
clone, containsKey, containsValue, getisEmptyOrSingle, isSingle, sizeclear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, equals, forEach, get, getOrDefault, hashCode, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size@Pure boolean isEmpty()
@Impure @NonFrozenRecipient @Chainable @Nonnull @Frozen @Nonnull @Frozen ReadOnlyMap<K,V> freeze()
freeze in interface net.digitalid.utility.freezable.FreezableInterface@Pure @NonCapturable @Nonnull @Nonnull FreezableSet<K> keySet()
keySet in interface Map<K,V>keySet in interface ReadOnlyMap<K,V>Map.keySet()@Pure @NonCapturable @Nonnull @Nonnull FreezableCollection<V> values()
values in interface Map<K,V>values in interface ReadOnlyMap<K,V>Map.values()@Pure @NonCapturable @Nonnull @Nonnull net.digitalid.utility.immutable.entry.ReadOnlyEntrySet<K,V> entrySet()
entrySet in interface Map<K,V>entrySet in interface ReadOnlyMap<K,V>Map.entrySet()@Impure @NonFrozenRecipient default void putAll(@Nonnull @Nonnull ReadOnlyMap<? extends K,? extends V> map)
@Impure @NonFrozenRecipient default void removeAll(@Nonnull @Nonnull net.digitalid.utility.functional.iterables.FiniteIterable<?> keys)
@Impure @NonFrozenRecipient default void removeAll(@NonCaptured @Unmodified @Nonnull @Nonnull Collection<?> keys)
@Impure @NonFrozenRecipient default void removeAll(@NonCaptured @Unmodified @Nonnull @Nonnull FreezableCollection<?> keys)
@Impure @NonFrozenRecipient default void removeAll(@Nonnull @Nonnull ReadOnlyMap<? extends K,? extends V> map)
@Impure @NonFrozenRecipient @NonCapturable @Nonnull default V putIfAbsentOrNullElseReturnPresent(@Captured K key, @Captured @Nonnull V value)
Copyright © 2017. All rights reserved.