Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.sablecc.sablecc
Class TypedHashMap  view TypedHashMap download TypedHashMap.java

java.lang.Object
  extended byjava.util.AbstractMap
      extended byjava.util.HashMap
          extended byorg.sablecc.sablecc.TypedHashMap
All Implemented Interfaces:
java.lang.Cloneable, java.util.Map, java.io.Serializable

public class TypedHashMap
extends java.util.HashMap


Nested Class Summary
private  class TypedHashMap.EntryIterator
           
private  class TypedHashMap.EntrySet
           
private  class TypedHashMap.TypedEntry
           
 
Nested classes inherited from class java.util.HashMap
 
Nested classes inherited from class java.util.AbstractMap
 
Nested classes inherited from class java.util.Map
java.util.Map.Entry
 
Field Summary
private  java.util.Set entries
           
private  Cast keyCast
           
private  Cast valueCast
           
 
Fields inherited from class java.util.HashMap
 
Fields inherited from class java.util.AbstractMap
 
Constructor Summary
TypedHashMap()
           
TypedHashMap(Cast keyCast, Cast valueCast)
           
TypedHashMap(int initialCapacity, Cast keyCast, Cast valueCast)
           
TypedHashMap(java.util.Map map)
           
TypedHashMap(java.util.Map map, Cast keyCast, Cast valueCast)
           
 
Method Summary
 java.lang.Object clone()
          Returns a shallow clone of this HashMap.
 java.util.Set entrySet()
          Returns a "set view" of this HashMap's entries.
 Cast getKeyCast()
           
 Cast getValueCast()
           
 java.lang.Object put(java.lang.Object key, java.lang.Object value)
          Puts the supplied value into the Map, mapped by the supplied key.
 
Methods inherited from class java.util.HashMap
clear, containsKey, containsValue, get, isEmpty, keySet, putAll, remove, size, values
 
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

keyCast

private Cast keyCast

valueCast

private Cast valueCast

entries

private java.util.Set entries
Constructor Detail

TypedHashMap

public TypedHashMap()

TypedHashMap

public TypedHashMap(int initialCapacity,
                    Cast keyCast,
                    Cast valueCast)

TypedHashMap

public TypedHashMap(java.util.Map map)

TypedHashMap

public TypedHashMap(Cast keyCast,
                    Cast valueCast)

TypedHashMap

public TypedHashMap(java.util.Map map,
                    Cast keyCast,
                    Cast valueCast)
Method Detail

clone

public java.lang.Object clone()
Description copied from class: java.util.HashMap
Returns a shallow clone of this HashMap. The Map itself is cloned, but its contents are not. This is O(n).


getKeyCast

public Cast getKeyCast()

getValueCast

public Cast getValueCast()

entrySet

public java.util.Set entrySet()
Description copied from class: java.util.HashMap
Returns a "set view" of this HashMap's entries. The set is backed by the HashMap, so changes in one show up in the other. The set supports element removal, but not element addition.

Note that the iterators for all three views, from keySet(), entrySet(), and values(), traverse the HashMap in the same sequence.


put

public java.lang.Object put(java.lang.Object key,
                            java.lang.Object value)
Description copied from class: java.util.HashMap
Puts the supplied value into the Map, mapped by the supplied key. The value may be retrieved by any object which equals() this key. NOTE: Since the prior value could also be null, you must first use containsKey if you want to see if you are replacing the key's mapping.