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 voidcacheObject(DictionaryElementType fileType, java.lang.Object key, java.lang.Object value)voidclearCache(DictionaryElementType fileType)protected CachecreateCache(int size)java.lang.ObjectgetCachedObject(DictionaryElementType fileType, java.lang.Object key)private java.util.MapgetMap(DictionaryElementType fileType)private voidinitLemmaToOffsetMaps()private voidremoveLemma(DictionaryElementType fileType, java.lang.String lemma, POS pos)voidupdate(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:
updatein 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:
createCachein classCacheSet
-
-