Package org.comroid.uniform.cache
Class Cache.Reference<K,V>
- java.lang.Object
-
- org.comroid.uniform.cache.Cache.Reference<K,V>
-
- All Implemented Interfaces:
java.util.function.Supplier<V>,org.comroid.api.SelfDeclared<org.comroid.mutatio.ref.Reference<V>>,org.comroid.api.Specifiable<org.comroid.mutatio.ref.Reference<V>>,org.comroid.mutatio.ref.Reference<V>,org.comroid.mutatio.ref.Reference.Settable<V>
public static class Cache.Reference<K,V> extends java.lang.Object implements org.comroid.mutatio.ref.Reference.Settable<V>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <K,V>
Cache.Reference<K,V>constant(K key, V value)static <K,V>
Cache.Reference<K,V>create()Vget()KgetKey()org.comroid.api.Provider<V>provider()Vset(V value)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.comroid.mutatio.ref.Reference
into, invocable, isNull, orElse, orElseGet, process, requireNonNull, requireNonNull, stream, test, wrap
-
-
-
-
Field Detail
-
reference
public final java.util.concurrent.atomic.AtomicReference<V> reference
-
-
Method Detail
-
getKey
@NotNull public K getKey()
-
create
public static <K,V> Cache.Reference<K,V> create()
-
constant
public static <K,V> Cache.Reference<K,V> constant(K key, V value)
-
set
@Nullable public V set(V value)
- Specified by:
setin interfaceorg.comroid.mutatio.ref.Reference.Settable<K>
-
get
@Nullable public V get()
-
-