org.ujmp.core.collections
Class AbstractDiskMap<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.core.collections.AbstractDiskMap<K,V>
All Implemented Interfaces:
Serializable, Map<K,V>, Erasable
Direct Known Subclasses:
SerializedObjectMap, TextMap

public abstract class AbstractDiskMap<K,V>
extends AbstractMap<K,V>
implements 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
AbstractDiskMap(File path, boolean useGZip)
           
 
Method Summary
 void clear()
           
 boolean containsKey(Object key)
           
 void erase()
           
 V get(Object key)
           
 File getPath()
           
 Set<K> keySet()
           
 V put(K key, V value)
           
abstract  V readValue(InputStream is)
           
 V remove(Object key)
           
 void setPath(File path)
           
 int size()
           
abstract  void writeValue(OutputStream os, V value)
           
 
Methods inherited from class org.ujmp.core.collections.AbstractMap
containsValue, 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

AbstractDiskMap

public AbstractDiskMap(File path,
                       boolean useGZip)
                throws IOException
Throws:
IOException
Method Detail

getPath

public final File getPath()

size

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

remove

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

containsKey

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

keySet

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

clear

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

erase

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

setPath

public final void setPath(File path)

put

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

get

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

writeValue

public abstract void writeValue(OutputStream os,
                                V value)

readValue

public abstract V readValue(InputStream is)


Copyright © 2010. All Rights Reserved.