de.grogra.xl.util
Class XHashMap<K,V>

java.lang.Object
  extended by de.grogra.xl.util.XHashMap<K,V>
All Implemented Interfaces:
java.lang.Iterable<XHashMap.Entry<K,V>>

public class XHashMap<K,V>
extends java.lang.Object
implements java.lang.Iterable<XHashMap.Entry<K,V>>


Nested Class Summary
static class XHashMap.Entry<K,V>
           
 
Constructor Summary
XHashMap()
           
XHashMap(int capacity)
           
XHashMap(int capacity, float loadFactor)
           
 
Method Summary
 void add(K key, V value)
           
 void clear()
           
 boolean containsKey(K key)
           
protected  boolean equals(K a, K b)
           
 V get(K key)
           
 java.lang.Object get(K key, java.lang.Object defaultValue)
           
 XHashMap.Entry getEntry(K key)
           
protected  int getHashCode(K o)
           
 boolean isEmpty()
           
 java.util.Iterator<XHashMap.Entry<K,V>> iterator()
           
 V put(K key, V value)
           
 V remove(K key)
           
 V remove(K key, V value)
           
 void remove(XHashMap.Entry<K,V> entry)
           
 void removeAll(K key)
           
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XHashMap

public XHashMap()

XHashMap

public XHashMap(int capacity)

XHashMap

public XHashMap(int capacity,
                float loadFactor)
Method Detail

add

public void add(K key,
                V value)

clear

public void clear()

containsKey

public boolean containsKey(K key)

equals

protected boolean equals(K a,
                         K b)

get

public V get(K key)

get

public java.lang.Object get(K key,
                            java.lang.Object defaultValue)

getEntry

public XHashMap.Entry getEntry(K key)

getHashCode

protected int getHashCode(K o)

isEmpty

public boolean isEmpty()

iterator

public java.util.Iterator<XHashMap.Entry<K,V>> iterator()
Specified by:
iterator in interface java.lang.Iterable<XHashMap.Entry<K,V>>

put

public V put(K key,
             V value)

remove

public V remove(K key)

remove

public V remove(K key,
                V value)

remove

public void remove(XHashMap.Entry<K,V> entry)

removeAll

public void removeAll(K key)

size

public int size()