2005/5/9

     
 

class HashMap

artefaktur
Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   Namespace Members   Compound Members   Related Pages  

acdk::util::HashMap Class Reference

#include <HashMap.h>

Inheritance diagram for acdk::util::HashMap:

acdk::util::AbstractMap acdk::lang::Cloneable acdk::io::Serializable acdk::lang::Object acdk::util::Map acdk::lang::ObjectBase acdk::lang::dmi::StdDispatch acdk::util::IdentityHashMap acdk::util::Properties acdk::make::TaskCfgFile List of all members.

Detailed Description

Implements a unsorted map using hashing Parts of this class are inspired from the GNU Classpath implementation.

Author:
of the orignal Classpath implementation: Copyright (c) 1998 by Jon A. Zeppieri (jon@eease.com), Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.

Roger Rene Kommer (mailto:kommer@artefaktur.com)

Version:
Revision
1.27
Date:
Date
2005/04/09 19:26:57


Public Member Functions

 HashMap (int initialCapacity=DEFAULT_CAPACITY, float initialLoadFactor=DEFAULT_LOAD_FACTOR)
 HashMap (IN(RMap) other)
virtual ~HashMap ()
virtual int size ()
virtual bool isEmpty ()
virtual void clear ()
virtual acdk::lang::Object clone ()
virtual acdk::lang::Object clone (sys::Allocator *alloc)
virtual RSet keySet ()
virtual RSet entrySet ()
virtual RCollection values ()
virtual bool containsKey (IN(acdk::lang::Object) key)
virtual bool containsValue (IN(acdk::lang::Object) value)
virtual acdk::lang::Object get (IN(acdk::lang::Object) key)
virtual acdk::lang::Object put (IN(acdk::lang::Object) key, IN(acdk::lang::Object) value)
virtual void putAll (IN(RMap) t)
virtual acdk::lang::Object remove (IN(acdk::lang::Object) key)
int capacity ()
float loadFactor ()
virtual RIterator iterator ()
ObjectHashFunc get_hashFunc ()
void set_hashFunc (ObjectHashFunc func)

Static Public Member Functions

acdk::lang::Object create_instance ()

Static Public Attributes

const int DEFAULT_CAPACITY
const float DEFAULT_LOAD_FACTOR

Private Member Functions

void _init (int initialCapacity, float initialLoadFactor)
int _hash (IN(acdk::lang::Object) key)
acdk::lang::Object _put (IN(acdk::lang::Object) key, IN(acdk::lang::Object) value)
void _rehash ()
RMapEntry _get (IN(acdk::lang::Object) key)
bool _containsEntry (IN(RMapEntry) entry)

Static Private Member Functions

acdk::lang::Object nilEntry ()

Private Attributes

int _capacity
int _size
float _loadFactor
int _threshold
int _modCount
RBucketArray _buckets
ObjectHashFunc _hashFunc

Static Private Attributes

acdk::lang::Object _nilEntry

Friends

class HashMapIterator
class HashMapSet
class HashMapKey


Constructor & Destructor Documentation

acdk::util::HashMap::HashMap int  initialCapacity = DEFAULT_CAPACITY,
float  initialLoadFactor = DEFAULT_LOAD_FACTOR
 

acdk::util::HashMap::HashMap IN(RMap other  ) 
 

virtual acdk::util::HashMap::~HashMap  )  [virtual]
 


Member Function Documentation

bool acdk::util::HashMap::_containsEntry IN(RMapEntry entry  )  [private]
 

RMapEntry acdk::util::HashMap::_get IN(acdk::lang::Object key  )  [private]
 

int acdk::util::HashMap::_hash IN(acdk::lang::Object key  )  [inline, private]
 

void acdk::util::HashMap::_init int  initialCapacity,
float  initialLoadFactor
[private]
 

acdk::lang::Object acdk::util::HashMap::_put IN(acdk::lang::Object key,
IN(acdk::lang::Object value
[private]
 

void acdk::util::HashMap::_rehash  )  [private]
 

int acdk::util::HashMap::capacity  )  [inline]
 

virtual void acdk::util::HashMap::clear  )  [virtual]
 

Reimplemented from acdk::util::AbstractMap.

virtual acdk::lang::Object acdk::util::HashMap::clone sys::Allocator *  alloc  )  [virtual]
 

Reimplemented from acdk::lang::Cloneable.

Reimplemented in acdk::util::Properties.

virtual acdk::lang::Object acdk::util::HashMap::clone  )  [inline, virtual]
 

Implements acdk::lang::Cloneable.

Reimplemented in acdk::util::Properties.

virtual bool acdk::util::HashMap::containsKey IN(acdk::lang::Object key  )  [inline, virtual]
 

Reimplemented from acdk::util::AbstractMap.

virtual bool acdk::util::HashMap::containsValue IN(acdk::lang::Object value  )  [virtual]
 

Reimplemented from acdk::util::AbstractMap.

acdk::lang::Object acdk::util::HashMap::create_instance  )  [inline, static]
 

Reimplemented from acdk::lang::Object.

Reimplemented in acdk::util::IdentityHashMap.

virtual RSet acdk::util::HashMap::entrySet  )  [virtual]
 

Implements acdk::util::AbstractMap.

virtual acdk::lang::Object acdk::util::HashMap::get IN(acdk::lang::Object key  )  [inline, virtual]
 

Reimplemented from acdk::util::AbstractMap.

ObjectHashFunc acdk::util::HashMap::get_hashFunc  )  [inline]
 

virtual bool acdk::util::HashMap::isEmpty  )  [inline, virtual]
 

Reimplemented from acdk::util::AbstractMap.

virtual RIterator acdk::util::HashMap::iterator  )  [virtual]
 

virtual RSet acdk::util::HashMap::keySet  )  [virtual]
 

Reimplemented from acdk::util::AbstractMap.

float acdk::util::HashMap::loadFactor  )  [inline]
 

acdk::lang::Object acdk::util::HashMap::nilEntry  )  [static, private]
 

virtual acdk::lang::Object acdk::util::HashMap::put IN(acdk::lang::Object key,
IN(acdk::lang::Object value
[inline, virtual]
 

Reimplemented from acdk::util::AbstractMap.

Reimplemented in acdk::make::TaskCfgFile.

virtual void acdk::util::HashMap::putAll IN(RMap t  )  [virtual]
 

Reimplemented from acdk::util::AbstractMap.

virtual acdk::lang::Object acdk::util::HashMap::remove IN(acdk::lang::Object key  )  [virtual]
 

Reimplemented from acdk::util::AbstractMap.

void acdk::util::HashMap::set_hashFunc ObjectHashFunc  func  )  [inline]
 

virtual int acdk::util::HashMap::size  )  [inline, virtual]
 

Reimplemented from acdk::util::AbstractMap.

virtual RCollection acdk::util::HashMap::values  )  [virtual]
 

Reimplemented from acdk::util::AbstractMap.


Friends And Related Function Documentation

friend class HashMapIterator [friend]
 

friend class HashMapKey [friend]
 

friend class HashMapSet [friend]
 


Member Data Documentation

RBucketArray acdk::util::HashMap::_buckets [private]
 

int acdk::util::HashMap::_capacity [private]
 

ObjectHashFunc acdk::util::HashMap::_hashFunc [private]
 

float acdk::util::HashMap::_loadFactor [private]
 

int acdk::util::HashMap::_modCount [private]
 

acdk::lang::Object acdk::util::HashMap::_nilEntry [static, private]
 

int acdk::util::HashMap::_size [private]
 

int acdk::util::HashMap::_threshold [private]
 

const int acdk::util::HashMap::DEFAULT_CAPACITY [static]
 

const float acdk::util::HashMap::DEFAULT_LOAD_FACTOR [static]