Package org.semanticweb.owlapi.util
Class WeakCache<K>
java.lang.Object
org.semanticweb.owlapi.util.WeakCache<K>
- Type Parameters:
K
- cached type
- All Implemented Interfaces:
Serializable
A weakly linked cache - elements in the cache can be garbage collected.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
WeakCache
public WeakCache()
-
-
Method Details
-
cache
- Parameters:
s
- the value to cache- Returns:
- the cached value
-
contains
- Parameters:
k
- the key to check- Returns:
- true if the cache contains k as a key; note that, due to the nature of this cache, by the time the method returns the key may no longer be in the map.
-
clear
public void clear()empty the cache.
-