| Package | Description |
|---|---|
| me.lucko.helper.metadata |
| Modifier and Type | Class and Description |
|---|---|
class |
ExpireAfterAccessValue<T>
Represents a value which will expire a set amount of time after the last access
|
class |
ExpiringValue<T>
Represents a value which will expire in the future
|
class |
SoftValue<T>
Represents a value wrapped in a
SoftReference |
class |
WeakValue<T>
Represents a value wrapped in a
WeakReference |
| Modifier and Type | Method and Description |
|---|---|
<T> void |
MetadataMap.forcePut(MetadataKey<T> key,
TransientValue<T> value)
Adds a metadata key and corresponding value into this map, removing any previous value if present.
|
<T> void |
MetadataMap.put(MetadataKey<T> key,
TransientValue<T> value)
Adds a metadata key and corresponding value into this map, removing any previous value if present.
|
<T> boolean |
MetadataMap.putIfAbsent(MetadataKey<T> key,
TransientValue<T> value)
Adds a metadata key and corresponding value into this map, only if an existing key is not present.
|
| Modifier and Type | Method and Description |
|---|---|
<T> T |
MetadataMap.getOrPutExpiring(MetadataKey<T> key,
Supplier<? extends TransientValue<T>> def)
Gets a value for the given key, or puts and returns the default if one isn't present.
|
Copyright © 2022. All rights reserved.