public interface TypedKeyStorage extends TypedKeyStorageImmutable
| Modifier and Type | Method and Description |
|---|---|
<T> T |
compute(@NotNull TypedKey<T> key,
@NotNull java.util.function.Function<T,T> oldValueToNewValue)
Computes a new value for the given key.
|
<T> T |
computeIfAbsent(@NotNull TypedKey<T> key,
@NotNull java.util.function.Supplier<T> valueSupplier)
Computes a new value for the given key if the key is absent.
|
<T> T |
computeIfPresent(@NotNull TypedKey<T> key,
@NotNull java.util.function.Function<T,T> oldValueToNewValue)
Computes a new value for the given key if the key is present.
|
<T> boolean |
put(@NotNull TypedKey<T> key,
T value)
Puts a value into the storage.
|
<T> boolean |
remove(@NotNull TypedKey<T> key)
Removes a value from the storage.
|
contains, entries, get, get, getOrDefault, getOrDefault, getOrThrow, getOrThrow, getUnchecked, getUncheckedOrThrow, keys, map, values<T> boolean put(@NotNull
@NotNull TypedKey<T> key,
@NotNull
T value)
key - the keyvalue - the value@NotNull
<T> T compute(@NotNull
@NotNull TypedKey<T> key,
@NotNull
@NotNull java.util.function.Function<T,T> oldValueToNewValue)
key - the keyoldValueToNewValue - the function to compute the new value@NotNull
<T> T computeIfAbsent(@NotNull
@NotNull TypedKey<T> key,
@NotNull
@NotNull java.util.function.Supplier<T> valueSupplier)
key - the keyvalueSupplier - the supplier to compute the new value@Nullable
<T> T computeIfPresent(@NotNull
@NotNull TypedKey<T> key,
@NotNull
@NotNull java.util.function.Function<T,T> oldValueToNewValue)
key - the keyoldValueToNewValue - the function to compute the new value<T> boolean remove(@NotNull
@NotNull TypedKey<T> key)
key - the key