edu.stanford.nlp.database
Class HashDB

java.lang.Object
  |
  +--edu.stanford.nlp.database.AbstractSimpleDatabase
        |
        +--edu.stanford.nlp.database.HashDB
All Implemented Interfaces:
SimpleDatabase

public class HashDB
extends AbstractSimpleDatabase

SimpleDatabase wrapper for a Hashtable


Constructor Summary
HashDB()
           
 
Method Summary
 Object get(Object key)
          Gets Object from database
 Iterator keys()
          Returns an Iterator over keys in database
 void put(Object key, Object value)
          Inserts Object into database
 void remove(Object key)
          Removes Object from database
 int size()
          Returns number of elements in database
 String toString()
          Returns String representation of database.
 String toVerboseString()
          Returns Verbose String representation of database that enumerates the contents of the database
 String toVerboseXMLString()
          Returns a verbose XML reprentation of database that enumerates the contents of the database
 String toXMLString()
          Returns an XML representation of database.
 Iterator values()
          returns an Iterator over values in database
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HashDB

public HashDB()
Method Detail

size

public int size()
Description copied from interface: SimpleDatabase
Returns number of elements in database


put

public void put(Object key,
                Object value)
         throws IOException
Description copied from interface: SimpleDatabase
Inserts Object into database

IOException

get

public Object get(Object key)
Description copied from interface: SimpleDatabase
Gets Object from database


remove

public void remove(Object key)
            throws IOException
Description copied from interface: SimpleDatabase
Removes Object from database

IOException

toString

public String toString()
Description copied from interface: SimpleDatabase
Returns String representation of database. Often it will be of the form: filename: /nlp/sdkamvar/sample.db type: SLJDB

Specified by:
toString in interface SimpleDatabase
Overrides:
toString in class Object

toVerboseString

public String toVerboseString()
Description copied from interface: SimpleDatabase
Returns Verbose String representation of database that enumerates the contents of the database

Specified by:
toVerboseString in interface SimpleDatabase
Overrides:
toVerboseString in class AbstractSimpleDatabase

toXMLString

public String toXMLString()
Description copied from interface: SimpleDatabase
Returns an XML representation of database. Often it will be of the form: /nlp/sdkamvar/sample.db SLJDB


toVerboseXMLString

public String toVerboseXMLString()
Description copied from interface: SimpleDatabase
Returns a verbose XML reprentation of database that enumerates the contents of the database

Specified by:
toVerboseXMLString in interface SimpleDatabase
Overrides:
toVerboseXMLString in class AbstractSimpleDatabase

keys

public Iterator keys()
Description copied from interface: SimpleDatabase
Returns an Iterator over keys in database


values

public Iterator values()
returns an Iterator over values in database



Stanford NLP Group