All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class au.com.pharos.gdbm.GdbmDictionary

au.com.pharos.gdbm.GdbmDictionary

public class GdbmDictionary
implements Closeable
A GDBM database, presented as a Java dictionary.

This is a separate class which defers most operations to GdbmFile because GdbmFile can throw IO exceptions, and because the interface assumptions for Dictionary are not the same as those of the IO library. Perhaps they should be the same.

The Dictionary class will be partially replaced by the much more elegant Collections API in JDK1.2, at which time a GDBM Collections interface will probably be available.

Version:
$Revision: 3.5 $
Author:
Martin Pool
See Also:
Dictionary, GdbmFile

Constructor Index

 o GdbmDictionary(GdbmFile)

Method Index

 o checkError()
 o close()
Write outstanding changes to the underlying database, and close the database.
 o elements()
 o get(Object)
 o isEmpty()
 o keys()
 o put(Object, Object)
 o remove(Object)
 o size()
 o sync()
Write outstanding changes to the underlying database, but leave the database open.

Constructors

 o GdbmDictionary
 public GdbmDictionary(GdbmFile db)

Methods

 o checkError
 public Exception checkError()
 o size
 public int size()
 o isEmpty
 public boolean isEmpty()
 o keys
 public Enumeration keys()
 o elements
 public Enumeration elements()
 o get
 public Object get(Object key)
 o put
 public Object put(Object key,
                   Object value)
 o remove
 public Object remove(Object key)
 o close
 public void close()
Write outstanding changes to the underlying database, and close the database.

See Also:
Closeable
 o sync
 public void sync()
Write outstanding changes to the underlying database, but leave the database open.

See Also:
Closeable

All Packages  Class Hierarchy  This Package  Previous  Next  Index