org.ujmp.lucene
Class LuceneMap<K,V>

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by org.ujmp.core.collections.AbstractMap<K,V>
          extended by org.ujmp.lucene.LuceneMap<K,V>
All Implemented Interfaces:
Closeable, Flushable, Serializable, Map<K,V>, Erasable

public class LuceneMap<K,V>
extends AbstractMap<K,V>
implements Flushable, Closeable, Erasable

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Constructor Summary
LuceneMap()
           
LuceneMap(File dir)
           
LuceneMap(File path, boolean readOnly)
           
 
Method Summary
 void clear()
           
 void close()
           
 boolean containsKey(Object key)
           
 boolean containsValue(Object value)
           
 void erase()
           
 void flush()
           
 V get(Object key)
           
 org.apache.lucene.analysis.Analyzer getAnalyzer()
           
 org.apache.lucene.store.Directory getDirectory()
           
 File getPath()
           
 Set<K> keySet()
           
 void optimize()
           
 V put(K key, V value)
           
 V remove(Object key)
           
 void setAnalyzer(org.apache.lucene.analysis.Analyzer analyzer)
           
 int size()
           
 
Methods inherited from class org.ujmp.core.collections.AbstractMap
entrySet, isEmpty, putAll, values
 
Methods inherited from class java.util.AbstractMap
clone, equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LuceneMap

public LuceneMap()
          throws IOException
Throws:
IOException

LuceneMap

public LuceneMap(File dir)
          throws IOException
Throws:
IOException

LuceneMap

public LuceneMap(File path,
                 boolean readOnly)
          throws IOException
Throws:
IOException
Method Detail

getDirectory

public org.apache.lucene.store.Directory getDirectory()
                                               throws IOException
Throws:
IOException

getPath

public File getPath()
             throws IOException
Throws:
IOException

optimize

public void optimize()
              throws org.apache.lucene.index.CorruptIndexException,
                     IOException
Throws:
org.apache.lucene.index.CorruptIndexException
IOException

clear

public void clear()
Specified by:
clear in interface Map<K,V>
Specified by:
clear in class AbstractMap<K,V>

containsKey

public boolean containsKey(Object key)
Specified by:
containsKey in interface Map<K,V>
Overrides:
containsKey in class AbstractMap<K,V>

containsValue

public boolean containsValue(Object value)
Specified by:
containsValue in interface Map<K,V>
Overrides:
containsValue in class AbstractMap<K,V>

get

public V get(Object key)
Specified by:
get in interface Map<K,V>
Specified by:
get in class AbstractMap<K,V>

keySet

public Set<K> keySet()
Specified by:
keySet in interface Map<K,V>
Specified by:
keySet in class AbstractMap<K,V>

put

public V put(K key,
             V value)
Specified by:
put in interface Map<K,V>
Specified by:
put in class AbstractMap<K,V>

remove

public V remove(Object key)
Specified by:
remove in interface Map<K,V>
Specified by:
remove in class AbstractMap<K,V>

getAnalyzer

public org.apache.lucene.analysis.Analyzer getAnalyzer()

setAnalyzer

public void setAnalyzer(org.apache.lucene.analysis.Analyzer analyzer)

size

public int size()
Specified by:
size in interface Map<K,V>
Specified by:
size in class AbstractMap<K,V>

flush

public void flush()
           throws IOException
Specified by:
flush in interface Flushable
Throws:
IOException

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Throws:
IOException

erase

public void erase()
           throws IOException
Specified by:
erase in interface Erasable
Throws:
IOException


Copyright © 2010. All Rights Reserved.