org.millscript.millscript.datatypes
Class HashMapWithDefault

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<java.lang.Object,java.lang.Object>
          extended by org.millscript.millscript.datatypes.HashMapWithDefault
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.Object,java.lang.Object>, MapWithDefault<java.lang.Object,java.lang.Object>

Deprecated. As of MillScript 10.2.0, this functionallity has been subsumed by the MillScript-Util project and it's Map API, see EHashMap.

@Deprecated
public class HashMapWithDefault
extends java.util.HashMap<java.lang.Object,java.lang.Object>
implements MapWithDefault<java.lang.Object,java.lang.Object>, java.io.Serializable

This interface provides a version of the usual HashMap that includes a notion of a default which can be exploited by the MillScript index operator.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Constructor Summary
HashMapWithDefault()
          Deprecated. Constructs a new empty hash map with default, using the default capacity and load factor.
HashMapWithDefault(int c)
          Deprecated. Constructs a new empty hash map with default, using the specified capacity and default load factor.
HashMapWithDefault(int c, float f)
          Deprecated. Constructs a new empty hash map with default, using the specified capacity and load factor.
HashMapWithDefault(java.util.Map<?,?> t)
          Deprecated. Constructs a new hash map with default, which will have the same mappings as the specified map.
 
Method Summary
 java.lang.Object getDefault()
          Deprecated. Returns the default value for this map.
 void setDefault(java.lang.Object d)
          Deprecated. Sets the default value for this map to the specified value.
 
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
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Constructor Detail

HashMapWithDefault

public HashMapWithDefault()
Deprecated. 
Constructs a new empty hash map with default, using the default capacity and load factor.


HashMapWithDefault

public HashMapWithDefault(int c)
Deprecated. 
Constructs a new empty hash map with default, using the specified capacity and default load factor.

Parameters:
c - the initial capacity

HashMapWithDefault

public HashMapWithDefault(int c,
                          float f)
Deprecated. 
Constructs a new empty hash map with default, using the specified capacity and load factor.

Parameters:
c - the initial capacity
f - the load factor

HashMapWithDefault

public HashMapWithDefault(java.util.Map<?,?> t)
Deprecated. 
Constructs a new hash map with default, which will have the same mappings as the specified map. The new hash map will use the default load factor and an initial capacity sufficient to hold all the mappings in the specified map.

Parameters:
t - the map to copy into this map
Method Detail

getDefault

public java.lang.Object getDefault()
Deprecated. 
Description copied from interface: MapWithDefault
Returns the default value for this map.

Specified by:
getDefault in interface MapWithDefault<java.lang.Object,java.lang.Object>
Returns:
the default value for this map.
See Also:
MapWithDefault.getDefault()

setDefault

public void setDefault(java.lang.Object d)
Deprecated. 
Description copied from interface: MapWithDefault
Sets the default value for this map to the specified value.

Specified by:
setDefault in interface MapWithDefault<java.lang.Object,java.lang.Object>
Parameters:
d - the new default value for this map.
See Also:
MapWithDefault.setDefault(java.lang.Object)


Copyright © 2001-2007 Open World Ltd. All Rights Reserved.