@GenerateBuilder @GenerateSubclass @Freezable(value=ReadOnlyMap.class) public abstract class FreezableLinkedHashMap<K,V> extends LinkedHashMap<K,V> implements FreezableMap<K,V>
LinkedHashMap and makes it freezable.
It is recommended to use only Immutable types for the keys
and ReadOnly or Immutable types for the values.AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Modifier | Constructor and Description |
|---|---|
protected |
FreezableLinkedHashMap(@NonNegative int initialCapacity,
@Positive float loadFactor,
boolean accessOrder) |
protected |
FreezableLinkedHashMap(@Nonnull Map<? extends K,? extends V> map) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
@Nonnull @NonFrozen FreezableLinkedHashMap<K,V> |
clone() |
@Nonnull net.digitalid.utility.immutable.entry.ReadOnlyEntrySet<K,V> |
entrySet() |
@Nonnull @Frozen ReadOnlyMap<K,V> |
freeze() |
boolean |
isEmpty() |
boolean |
isFrozen() |
@Nonnull @NullableElements FreezableSet<K> |
keySet() |
V |
put(K key,
V value) |
void |
putAll(@Nonnull Map<? extends K,? extends V> map) |
V |
remove(@Nullable Object object) |
@Nonnull String |
toString() |
@Nonnull @NullableElements FreezableCollection<V> |
values() |
static <K,V> @NonFrozen FreezableLinkedHashMap<K,V> |
withMappingsOf(FreezableMap<? extends K,? extends V> map)
Returns a new freezable linked hash map with the mappings of the given map or null if the given map is null.
|
static <K,V> @NonFrozen FreezableLinkedHashMap<K,V> |
withMappingsOf(Map<? extends K,? extends V> map)
Returns a new freezable linked hash map with the mappings of the given map or null if the given map is null.
|
static <K,V> @NonFrozen FreezableLinkedHashMap<K,V> |
withMappingsOf(ReadOnlyMap<? extends K,? extends V> map)
Returns a new freezable linked hash map with the mappings of the given map or null if the given map is null.
|
containsValue, forEach, get, getOrDefault, removeEldestEntry, replaceAllcompute, computeIfAbsent, computeIfPresent, containsKey, merge, putIfAbsent, remove, replace, replace, sizeequals, hashCodefinalize, getClass, hashCode, notify, notifyAll, wait, wait, waitputAll, putIfAbsentOrNullElseReturnPresent, removeAll, removeAll, removeAll, removeAllcontainsKey, containsValue, getisEmptyOrSingle, isSingle, sizecompute, computeIfAbsent, computeIfPresent, containsKey, containsValue, equals, forEach, get, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll, size@Recover
protected FreezableLinkedHashMap(@NonNegative @Default(value="16")
@NonNegative int initialCapacity,
@Positive @Default(value="0.75f")
@Positive float loadFactor,
@Default(value="false")
boolean accessOrder)
@Pure
@TODO(task="For some reasons, the SubclassGenerator treats this method as abstract and generates a required field for it if this method is removed.",
date="2016-04-29",
author=KASPAR_ETTER,
assignee=STEPHANIE_STROKA,
priority=HIGH)
public boolean isEmpty()
@Pure @Capturable @NonFrozen public static <K,V> @NonFrozen FreezableLinkedHashMap<K,V> withMappingsOf(ReadOnlyMap<? extends K,? extends V> map)
@Pure @Capturable @NonFrozen public static <K,V> @NonFrozen FreezableLinkedHashMap<K,V> withMappingsOf(@NonCaptured @Unmodified Map<? extends K,? extends V> map)
@Pure @Capturable @NonFrozen public static <K,V> @NonFrozen FreezableLinkedHashMap<K,V> withMappingsOf(@NonCaptured @Unmodified FreezableMap<? extends K,? extends V> map)
@Pure public boolean isFrozen()
isFrozen in interface net.digitalid.utility.freezable.ReadOnlyInterface@Impure @NonFrozenRecipient @Chainable @Nonnull @Frozen public @Nonnull @Frozen ReadOnlyMap<K,V> freeze()
freeze in interface FreezableMap<K,V>freeze in interface net.digitalid.utility.freezable.FreezableInterface@Pure @Capturable @Nonnull @NonFrozen public @Nonnull @NonFrozen FreezableLinkedHashMap<K,V> clone()
@Pure @NonCapturable @Nonnull @NullableElements public @Nonnull @NullableElements FreezableSet<K> keySet()
keySet in interface Map<K,V>keySet in interface FreezableMap<K,V>keySet in interface ReadOnlyMap<K,V>keySet in class LinkedHashMap<K,V>Map.keySet()@Pure @NonCapturable @Nonnull @NullableElements public @Nonnull @NullableElements FreezableCollection<V> values()
values in interface Map<K,V>values in interface FreezableMap<K,V>values in interface ReadOnlyMap<K,V>values in class LinkedHashMap<K,V>Map.values()@Pure @NonCapturable @Nonnull public @Nonnull net.digitalid.utility.immutable.entry.ReadOnlyEntrySet<K,V> entrySet()
entrySet in interface Map<K,V>entrySet in interface FreezableMap<K,V>entrySet in interface ReadOnlyMap<K,V>entrySet in class LinkedHashMap<K,V>Map.entrySet()@Impure @NonFrozenRecipient @Capturable @Nullable public V put(@Captured K key, @Captured V value)
@Impure @NonFrozenRecipient public void putAll(@NonCaptured @Unmodified @Nonnull @Nonnull Map<? extends K,? extends V> map)
@Impure @NonFrozenRecipient @Capturable @Nullable public V remove(@NonCaptured @Unmodified @Nullable @Nullable Object object)
@Impure @NonFrozenRecipient public void clear()
Copyright © 2017. All rights reserved.