org.apache.yoko.rmi.util
Class DynamicHashMap

java.lang.Object
  extended by org.apache.yoko.rmi.util.DynamicHashMap
All Implemented Interfaces:
Map

public class DynamicHashMap
extends Object
implements Map

Class DynamicHashMap is a generic dynamic hash map.


Field Summary
protected  int size
           
 
Constructor Summary
DynamicHashMap()
          the default and only constructor
 
Method Summary
 void clear()
           
 boolean containsKey(int hash, Object key)
           
 boolean containsKey(Object key)
          return the element with the given key
 boolean containsValue(Object value)
          return the element with the given key
protected  Iterator entryIterator()
           
 Set entrySet()
           
 boolean equals(Object other)
           
 Object get(int hash, Object key)
           
 Object get(Object key)
          return the element with the given key
 int hashCode()
           
 boolean isEmpty()
           
protected  boolean keyEquals(Object key1, Object key2)
           
protected  int keyHash(Object key)
           
protected  Iterator keyIterator()
           
 Set keySet()
           
 Object put(int hash, Object key, Object value)
           
 Object put(Object key, Object value)
           
 void putAll(Map other)
           
 Object remove(int hash, Object key)
           
 Object remove(Object key)
           
 int size()
           
protected  boolean valueEquals(Object value1, Object value2)
           
protected  int valueHash(Object value)
           
protected  Iterator valueIterator()
           
 Collection values()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Map
containsValue, entrySet, equals, hashCode, isEmpty, keySet, putAll, size, values
 

Field Detail

size

protected int size
Constructor Detail

DynamicHashMap

public DynamicHashMap()
the default and only constructor

Method Detail

clear

public void clear()
Specified by:
clear in interface Map

get

public Object get(Object key)
return the element with the given key

Specified by:
get in interface Map

get

public Object get(int hash,
                  Object key)

containsKey

public boolean containsKey(Object key)
return the element with the given key

Specified by:
containsKey in interface Map

containsKey

public boolean containsKey(int hash,
                           Object key)

put

public Object put(Object key,
                  Object value)
Specified by:
put in interface Map

put

public Object put(int hash,
                  Object key,
                  Object value)

remove

public Object remove(Object key)
Specified by:
remove in interface Map

remove

public Object remove(int hash,
                     Object key)

entryIterator

protected Iterator entryIterator()

size

public int size()
Specified by:
size in interface Map

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Map

keyHash

protected int keyHash(Object key)

keyEquals

protected boolean keyEquals(Object key1,
                            Object key2)

valueHash

protected int valueHash(Object value)

valueEquals

protected boolean valueEquals(Object value1,
                              Object value2)

putAll

public void putAll(Map other)
Specified by:
putAll in interface Map

keyIterator

protected Iterator keyIterator()

valueIterator

protected Iterator valueIterator()

values

public Collection values()
Specified by:
values in interface Map

keySet

public Set keySet()
Specified by:
keySet in interface Map

hashCode

public int hashCode()
Specified by:
hashCode in interface Map
Overrides:
hashCode in class Object

equals

public boolean equals(Object other)
Specified by:
equals in interface Map
Overrides:
equals in class Object

entrySet

public Set entrySet()
Specified by:
entrySet in interface Map

containsValue

public boolean containsValue(Object value)
return the element with the given key

Specified by:
containsValue in interface Map


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.