org.exolab.core.foundation
Interface HashMapIfc

All Superinterfaces:
PersistentCapableIfc, java.io.Serializable
All Known Implementing Classes:
PMDHashMap

public interface HashMapIfc
extends PersistentCapableIfc, java.io.Serializable

This interface abstracts the Persistent HashMap data structure so that it can be mapped to various persistent and transient datastores. It basically uses the JDK1.1.2 java.util.Hashtable to derive the interface but applies to keys and objects that support the PersistentCapableIfc type.

Version:
$Revision: 1.3 $ $Date: 2000/04/28 07:37:51 $
Author:
Jim Alateras
See Also:
PersistentCapableIfc, Serializable

Method Summary
 void clear()
          Clear the map
 boolean containsKey(java.lang.Object key)
          Return true if the specified key maps to an element in the map
 boolean containsValue(PersistentCapableIfc element)
          Test to see whether the map contains the a key for this value
 java.util.Enumeration elements()
          Return an enumeration of all the elements in the map
 PersistentCapableIfc get(java.lang.Object key)
          Return the object mapped to this key.
 java.lang.Object getMapObject()
          Return a refernece to the enclosed map.
 boolean isEmpty()
          Test for an empty hashmap
 java.util.Enumeration keys()
          Return the enumeration of all keys in the map
 PersistentCapableIfc put(java.lang.Object key, PersistentCapableIfc element)
          Add the key and associated element to the map and return a reference to the object
 PersistentCapableIfc remove(java.lang.Object key)
          Remove the object mapped to the specified key from the map and return it to the client
 int size()
          Return the size of the map
 
Methods inherited from interface org.exolab.core.foundation.PersistentCapableIfc
getMinimumObjectSize, getObjectId, getObjectVersion, setMinimumObjectSize
 

Method Detail

size

int size()
Return the size of the map

Returns:
int

isEmpty

boolean isEmpty()
Test for an empty hashmap

Returns:
boolean true if empty; false otherwise

keys

java.util.Enumeration keys()
Return the enumeration of all keys in the map

Returns:
Enumeration

elements

java.util.Enumeration elements()
Return an enumeration of all the elements in the map

Returns:
Enumeration

containsValue

boolean containsValue(PersistentCapableIfc element)
Test to see whether the map contains the a key for this value

Parameters:
element - element to test against
Returns:
boolean true if key is mapped; false otherwise

containsKey

boolean containsKey(java.lang.Object key)
Return true if the specified key maps to an element in the map

Parameters:
key - key to test against
Returns:
boolean true if it maps; false otherwise

get

PersistentCapableIfc get(java.lang.Object key)
Return the object mapped to this key.

Parameters:
key - key to lookup
Returns:
PersistentCapableIfc mapped object or null if it is not mapped

put

PersistentCapableIfc put(java.lang.Object key,
                         PersistentCapableIfc element)
Add the key and associated element to the map and return a reference to the object

Parameters:
key - key to map
element - corresponding element
Returns:
PersistentCapableIfc the object added to the map.

remove

PersistentCapableIfc remove(java.lang.Object key)
Remove the object mapped to the specified key from the map and return it to the client

Parameters:
key - key to remove
PersistentCapableIfc - coreesponding element

clear

void clear()
Clear the map


getMapObject

java.lang.Object getMapObject()
Return a refernece to the enclosed map. To be used it will have be cast to the Hashtable

Returns:
Object


Copyright © 1999-2012 The Exolab Group. All Rights Reserved.