JML

java.util
Class HashMap

java.lang.Object
  extended byjava.util.AbstractMap
      extended byjava.util.HashMap
All Implemented Interfaces:
Cloneable, Map, Serializable
Direct Known Subclasses:
CAugmentationMap.ContextMap, CGFCollectionMap.SetMap

public class HashMap
extends AbstractMap
implements Map, Cloneable, Serializable


Nested Class Summary
(package private) static class HashMap.1
           
(package private) static class HashMap.Entry
           
private  class HashMap.EntryIterator
           
private  class HashMap.EntrySet
           
private  class HashMap.HashIterator
           
private  class HashMap.KeyIterator
           
private  class HashMap.KeySet
           
private  class HashMap.ValueIterator
           
private  class HashMap.Values
           
 
Nested classes inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry, AbstractMap.SimpleImmutableEntry
 
Field Summary
(package private) static int DEFAULT_INITIAL_CAPACITY
           
(package private) static float DEFAULT_LOAD_FACTOR
           
private  Set entrySet
           
(package private)  float loadFactor
           
(package private) static int MAXIMUM_CAPACITY
           
(package private)  int modCount
           
private static long serialVersionUID
           
(package private)  int size
           
(package private)  HashMap.Entry[] table
           
(package private)  int threshold
           
 
Fields inherited from class java.util.AbstractMap
keySet, values
 
Constructor Summary
HashMap()
           
HashMap(int)
           
HashMap(int, float)
           
HashMap(Map)
           
 
Method Summary
(package private)  void addEntry(int, Object, Object, int)
           
(package private)  int capacity()
           
 void clear()
           
 Object clone()
           
 boolean containsKey(Object)
           
private  boolean containsNullValue()
           
 boolean containsValue(Object)
           
(package private)  void createEntry(int, Object, Object, int)
           
 Set entrySet()
           
private  Set entrySet0()
           
 Object get(Object)
           
(package private)  HashMap.Entry getEntry(Object)
           
private  Object getForNullKey()
           
(package private) static int hash(int)
           
(package private) static int indexFor(int, int)
           
(package private)  void init()
           
 boolean isEmpty()
           
 Set keySet()
           
(package private)  float loadFactor()
           
(package private)  Iterator newEntryIterator()
           
(package private)  Iterator newKeyIterator()
           
(package private)  Iterator newValueIterator()
           
 Object put(Object, Object)
           
 void putAll(Map)
           
private  void putAllForCreate(Map)
           
private  void putForCreate(Object, Object)
           
private  Object putForNullKey(Object)
           
private  void readObject(ObjectInputStream)
           
 Object remove(Object)
           
(package private)  HashMap.Entry removeEntryForKey(Object)
           
(package private)  HashMap.Entry removeMapping(Object)
           
(package private)  void resize(int)
           
 int size()
           
(package private)  void transfer(HashMap.Entry[])
           
 Collection values()
           
private  void writeObject(ObjectOutputStream)
           
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Field Detail

serialVersionUID

private static final long serialVersionUID

DEFAULT_LOAD_FACTOR

static final float DEFAULT_LOAD_FACTOR

MAXIMUM_CAPACITY

static final int MAXIMUM_CAPACITY

threshold

int threshold

modCount

transient volatile int modCount

entrySet

private transient Set entrySet

DEFAULT_INITIAL_CAPACITY

static final int DEFAULT_INITIAL_CAPACITY

table

transient HashMap.Entry[] table

loadFactor

final float loadFactor

size

transient int size
Constructor Detail

HashMap

public HashMap(int,
               float)

HashMap

public HashMap(int)

HashMap

public HashMap()

HashMap

public HashMap(Map)
Method Detail

init

void init()

hash

static int hash(int)

indexFor

static int indexFor(int,
                    int)

size

public int size()
Specified by:
size in interface Map
Overrides:
size in class AbstractMap

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Map
Overrides:
isEmpty in class AbstractMap

get

public Object get(Object)
Specified by:
get in interface Map
Overrides:
get in class AbstractMap

getForNullKey

private Object getForNullKey()

containsKey

public boolean containsKey(Object)
Specified by:
containsKey in interface Map
Overrides:
containsKey in class AbstractMap

getEntry

final HashMap.Entry getEntry(Object)

put

public Object put(Object,
                  Object)
Specified by:
put in interface Map
Overrides:
put in class AbstractMap

putForNullKey

private Object putForNullKey(Object)

putForCreate

private void putForCreate(Object,
                          Object)

putAllForCreate

private void putAllForCreate(Map)

resize

void resize(int)

transfer

void transfer(HashMap.Entry[])

putAll

public void putAll(Map)
Specified by:
putAll in interface Map
Overrides:
putAll in class AbstractMap

remove

public Object remove(Object)
Specified by:
remove in interface Map
Overrides:
remove in class AbstractMap

removeEntryForKey

final HashMap.Entry removeEntryForKey(Object)

removeMapping

final HashMap.Entry removeMapping(Object)

clear

public void clear()
Specified by:
clear in interface Map
Overrides:
clear in class AbstractMap

containsValue

public boolean containsValue(Object)
Specified by:
containsValue in interface Map
Overrides:
containsValue in class AbstractMap

containsNullValue

private boolean containsNullValue()

clone

public Object clone()
Overrides:
clone in class AbstractMap

addEntry

void addEntry(int,
              Object,
              Object,
              int)

createEntry

void createEntry(int,
                 Object,
                 Object,
                 int)

newKeyIterator

Iterator newKeyIterator()

newValueIterator

Iterator newValueIterator()

newEntryIterator

Iterator newEntryIterator()

keySet

public Set keySet()
Specified by:
keySet in interface Map
Overrides:
keySet in class AbstractMap

values

public Collection values()
Specified by:
values in interface Map
Overrides:
values in class AbstractMap

entrySet

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

entrySet0

private Set entrySet0()

writeObject

private void writeObject(ObjectOutputStream)
                  throws IOException
Throws:
IOException

readObject

private void readObject(ObjectInputStream)
                 throws IOException,
                        ClassNotFoundException
Throws:
IOException
ClassNotFoundException

capacity

int capacity()

loadFactor

float loadFactor()

JML

JML is Copyright (C) 1998-2002 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This release depends on code from the MultiJava project and is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.