org.planx.xmlstore.io
Class PersistentMap<K,V>

java.lang.Object
  extended by org.planx.xmlstore.io.PersistentMap<K,V>

public class PersistentMap<K,V>
extends Object

Author:
Kasper Bøgebjerg, Henning Niss, Thomas Ambus

Constructor Summary
PersistentMap(String filename, Streamer<K> s1, Streamer<V> s2)
           
PersistentMap(String filename, Streamer<K> s1, Streamer<V> s2, boolean isSet)
          If isSet is true the Map will ignore values (saves space on disk).
 
Method Summary
 V get(K key)
           
 Set<K> keySet()
           
 void put(K key, V value)
           
 void replace(V oldValue, V newValue)
           
 String toString()
           
 Collection<V> values()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PersistentMap

public PersistentMap(String filename,
                     Streamer<K> s1,
                     Streamer<V> s2)
              throws IOException
Throws:
IOException

PersistentMap

public PersistentMap(String filename,
                     Streamer<K> s1,
                     Streamer<V> s2,
                     boolean isSet)
              throws IOException
If isSet is true the Map will ignore values (saves space on disk).

Throws:
IOException
Method Detail

get

public V get(K key)

put

public void put(K key,
                V value)
         throws IOException
Throws:
IOException

replace

public void replace(V oldValue,
                    V newValue)
             throws IOException
Throws:
IOException

keySet

public Set<K> keySet()

values

public Collection<V> values()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2010. All Rights Reserved.