Class SoftCache<K,V>
java.lang.Object
com.formdev.flatlaf.util.SoftCache<K,V>
- All Implemented Interfaces:
Map<K,V>
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map<K, SoftCache.CacheReference<K, V>> private final ReferenceQueue<V> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) Not supported.entrySet()Not supported.private voidvoidforEach(BiConsumer<? super K, ? super V> action) Not supported.private VgetRef(SoftCache.CacheReference<K, V> ref) booleanisEmpty()keySet()voidvoidreplaceAll(BiFunction<? super K, ? super V, ? extends V> function) Not supported.intsize()values()Not supported.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Map
compute, computeIfAbsent, computeIfPresent, equals, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace
-
Field Details
-
map
-
queue
-
-
Constructor Details
-
SoftCache
public SoftCache() -
SoftCache
public SoftCache(int initialCapacity)
-
-
Method Details
-
size
-
isEmpty
-
containsKey
- Specified by:
containsKeyin interfaceMap<K,V>
-
containsValue
Not supported. ThrowsUnsupportedOperationException.- Specified by:
containsValuein interfaceMap<K,V>
-
get
-
put
-
remove
-
getRef
-
putAll
-
clear
-
keySet
-
values
Not supported. ThrowsUnsupportedOperationException. -
entrySet
-
forEach
Not supported. ThrowsUnsupportedOperationException. -
replaceAll
Not supported. ThrowsUnsupportedOperationException.- Specified by:
replaceAllin interfaceMap<K,V>
-
expungeStaleEntries
private void expungeStaleEntries()
-