org.apache.cocoon.util
Class HashMap

java.lang.Object
  extended byjava.util.AbstractMap
      extended byjava.util.HashMap
          extended byorg.apache.cocoon.util.HashMap
All Implemented Interfaces:
Cloneable, Map, Serializable

public class HashMap
extends HashMap

Extended Version of HashMap that provides an extended get method accpeting a default value. The default value is returned if the map does not contain a value for the provided key.

Version:
$Id: HashMap.html 1304280 2012-03-23 11:18:01Z ilgrosso $
See Also:
Serialized Form

Constructor Summary
HashMap()
           
HashMap(int initialCapacity)
           
HashMap(int initialCapacity, float loadFactor)
           
HashMap(Map t)
           
 
Method Summary
 Object get(Object key, Object _default)
          Get method extended by default object to be returned when key is not found.
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, 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
 

Constructor Detail

HashMap

public HashMap()

HashMap

public HashMap(int initialCapacity)

HashMap

public HashMap(int initialCapacity,
               float loadFactor)

HashMap

public HashMap(Map t)
Method Detail

get

public Object get(Object key,
                  Object _default)
Get method extended by default object to be returned when key is not found.

Parameters:
key - key to look up
_default - default value to return if key is not found
Returns:
value that is associated with key


Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.