net.walend.collection
Class MutableHashMap

java.lang.Object
  |
  +--net.walend.collection.AbstractHashMap
        |
        +--net.walend.collection.MutableHashMap
All Implemented Interfaces:
java.lang.Cloneable, HasState, Map, MutableMap, java.io.Serializable

public class MutableHashMap
extends AbstractHashMap
implements MutableMap

Since:
20010705
Author:
David Walend

Nested Class Summary
 
Nested classes inherited from class net.walend.collection.AbstractHashMap
AbstractHashMap.Entry
 
Field Summary
 
Fields inherited from class net.walend.collection.AbstractHashMap
 
Fields inherited from interface net.walend.collection.Map
EMPTY
 
Constructor Summary
MutableHashMap()
           
MutableHashMap(Identitor identitor)
           
MutableHashMap(Identitor identitor, int capacity)
           
MutableHashMap(Identitor identitor, int capacity, float loadFactor)
           
MutableHashMap(int capacity)
           
MutableHashMap(int capacity, float loadFactor)
           
MutableHashMap(java.util.Map orig)
           
MutableHashMap(Map orig)
           
 
Method Summary
 void clear()
          Removes all key, value pairs from this Map.
 java.lang.Object put(java.lang.Object key, java.lang.Object value)
          Puts the key,value pair in the map.
 void putAll(Map map)
          Puts all of the key, value pairs in map into this Map.
 java.lang.Object remove(java.lang.Object key)
          Removes the key, value pair from this Map.
 
Methods inherited from class net.walend.collection.AbstractHashMap
capacity, clone, containsAll, containsKey, containsValue, get, getIdentitor, getJavaMap, getKeys, getPrincipleInterface, getValues, isEmpty, keyIterator, loadFactor, newEntry, removeEntry, sameContentsAs, sameStateAs, size, toString, valueIterator
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.walend.collection.Map
containsAll, containsKey, containsValue, get, getIdentitor, getJavaMap, getKeys, getValues, isEmpty, keyIterator, sameContentsAs, size, valueIterator
 
Methods inherited from interface net.walend.collection.HasState
getPrincipleInterface, sameStateAs
 

Constructor Detail

MutableHashMap

public MutableHashMap()

MutableHashMap

public MutableHashMap(int capacity)

MutableHashMap

public MutableHashMap(int capacity,
                      float loadFactor)

MutableHashMap

public MutableHashMap(Identitor identitor)

MutableHashMap

public MutableHashMap(Identitor identitor,
                      int capacity)

MutableHashMap

public MutableHashMap(Identitor identitor,
                      int capacity,
                      float loadFactor)

MutableHashMap

public MutableHashMap(java.util.Map orig)

MutableHashMap

public MutableHashMap(Map orig)
Method Detail

put

public java.lang.Object put(java.lang.Object key,
                            java.lang.Object value)
Puts the key,value pair in the map. Returns the previous value associated with key. If no value was associated, it returns null.

Specified by:
put in interface MutableMap
Overrides:
put in class AbstractHashMap
Throws:
java.lang.NullPointerException - if the key or value is null.

remove

public java.lang.Object remove(java.lang.Object key)
Removes the key, value pair from this Map. Returns the value associated with key, or null if no value was associated.

Specified by:
remove in interface MutableMap
Overrides:
remove in class AbstractHashMap
Throws:
java.lang.NullPointerException - if the key is null.

putAll

public void putAll(Map map)
Puts all of the key, value pairs in map into this Map. map's pairs replace any conflicting pairs in this Map.

Specified by:
putAll in interface MutableMap
Overrides:
putAll in class AbstractHashMap
Throws:
java.lang.NullPointerException - if map is null.

clear

public void clear()
Removes all key, value pairs from this Map.

Specified by:
clear in interface MutableMap
Overrides:
clear in class AbstractHashMap


Copyright (c) 2000, 2001, David Walend