Package org.comroid.uniform.cache
Interface Cache<K,V>
-
- All Superinterfaces:
java.lang.Iterable<java.util.Map.Entry<K,V>>,org.comroid.mutatio.ref.ReferenceMap<K,V,Cache.Reference<K,V>>,org.comroid.mutatio.ref.ReferenceMap.Settable<K,V,Cache.Reference<K,V>>
- All Known Implementing Classes:
BasicCache,ProvidedCache
public interface Cache<K,V> extends java.lang.Iterable<java.util.Map.Entry<K,V>>, org.comroid.mutatio.ref.ReferenceMap.Settable<K,V,Cache.Reference<K,V>>
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classCache.Reference<K,V>
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default booleancanProvide()booleancontainsKey(K key)booleancontainsValue(V value)default voidforEach(java.util.function.BiConsumer<K,V> action)@NotNull Cache.Reference<K,V>getReference(K key, boolean createIfAbsent)booleanlarge()default org.comroid.mutatio.pipe.Pipe<?,Cache.Reference<K,V>>pipe()org.comroid.mutatio.pipe.Pipe<?,Cache.Reference<K,V>>pipe(java.util.function.Predicate<K> filter)default java.util.concurrent.CompletableFuture<V>provide(K key)intsize()default java.util.stream.Stream<Cache.Reference<K,V>>stream()java.util.stream.Stream<Cache.Reference<K,V>>stream(java.util.function.Predicate<K> filter)
-
-
-
Method Detail
-
large
boolean large()
-
size
int size()
-
containsKey
boolean containsKey(K key)
-
containsValue
boolean containsValue(V value)
-
stream
default java.util.stream.Stream<Cache.Reference<K,V>> stream()
-
stream
java.util.stream.Stream<Cache.Reference<K,V>> stream(java.util.function.Predicate<K> filter)
-
pipe
default org.comroid.mutatio.pipe.Pipe<?,Cache.Reference<K,V>> pipe()
-
pipe
org.comroid.mutatio.pipe.Pipe<?,Cache.Reference<K,V>> pipe(java.util.function.Predicate<K> filter)
-
getReference
@NotNull @NotNull Cache.Reference<K,V> getReference(K key, boolean createIfAbsent)
- Specified by:
getReferencein interfaceorg.comroid.mutatio.ref.ReferenceMap<K,V,Cache.Reference<K,V>>
-
canProvide
default boolean canProvide()
-
-