org.apache.accumulo.server.util
Class DefaultMap<K,V>

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<K,V>
          extended by org.apache.accumulo.server.util.DefaultMap<K,V>
All Implemented Interfaces:
Serializable, Cloneable, Map<K,V>

public class DefaultMap<K,V>
extends HashMap<K,V>

A HashMap that returns a default value if the key is not stored in the map. A zero-argument constructor of the default object's class is used, otherwise the default object is used.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Constructor Summary
DefaultMap(V dfault)
           
 
Method Summary
 V get(Object key)
           
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, 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

DefaultMap

public DefaultMap(V dfault)
Method Detail

get

public V get(Object key)
Specified by:
get in interface Map<K,V>
Overrides:
get in class HashMap<K,V>


Copyright © 2013 Apache Accumulo Project. All Rights Reserved.