Package net.didion.jwnl.dictionary
Class AbstractCachingDictionary.DictionaryCacheSet
- java.lang.Object
-
- net.didion.jwnl.util.cache.CacheSet
-
- net.didion.jwnl.dictionary.AbstractCachingDictionary.DictionaryCacheSet
-
- All Implemented Interfaces:
java.util.Observer
- Enclosing class:
- AbstractCachingDictionary
private static final class AbstractCachingDictionary.DictionaryCacheSet extends CacheSet implements java.util.Observer
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map
_lemmaToOffsetMaps
-
Fields inherited from class net.didion.jwnl.util.cache.CacheSet
DEFAULT_CACHE_CAPACITY
-
-
Constructor Summary
Constructors Constructor Description DictionaryCacheSet()
DictionaryCacheSet(int[] sizes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cacheObject(DictionaryElementType fileType, java.lang.Object key, java.lang.Object value)
void
clearCache(DictionaryElementType fileType)
protected Cache
createCache(int size)
java.lang.Object
getCachedObject(DictionaryElementType fileType, java.lang.Object key)
private java.util.Map
getMap(DictionaryElementType fileType)
private void
initLemmaToOffsetMaps()
private void
removeLemma(DictionaryElementType fileType, java.lang.String lemma, POS pos)
void
update(java.util.Observable obs, java.lang.Object obj)
-
Methods inherited from class net.didion.jwnl.util.cache.CacheSet
addCache, addCache, cacheObject, clearCache, getCache, getCacheCapacity, getCachedObject, getCacheSize, getSize, setCacheCapacity
-
-
-
-
Method Detail
-
getCachedObject
public java.lang.Object getCachedObject(DictionaryElementType fileType, java.lang.Object key)
-
cacheObject
public void cacheObject(DictionaryElementType fileType, java.lang.Object key, java.lang.Object value)
-
clearCache
public void clearCache(DictionaryElementType fileType)
-
update
public void update(java.util.Observable obs, java.lang.Object obj)
- Specified by:
update
in interfacejava.util.Observer
-
initLemmaToOffsetMaps
private void initLemmaToOffsetMaps()
-
removeLemma
private void removeLemma(DictionaryElementType fileType, java.lang.String lemma, POS pos)
-
getMap
private java.util.Map getMap(DictionaryElementType fileType)
-
createCache
protected Cache createCache(int size)
- Specified by:
createCache
in classCacheSet
-
-