org.millscript.millscript.datatypes
Class TreeMapWithDefault

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.TreeMap<java.lang.Object,java.lang.Object>
          extended by org.millscript.millscript.datatypes.TreeMapWithDefault
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.Object,java.lang.Object>, java.util.SortedMap<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 EBinaryTreeMap.

@Deprecated
public class TreeMapWithDefault
extends java.util.TreeMap<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 TreeMap that includes a notion of a default which can be exploited by the MillScript index operator. Because the default compareTo's can throw ClassCastExceptions we must take over the Comparator.

See Also:
GeneralComparator, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Constructor Summary
TreeMapWithDefault()
          Deprecated. Constructs a new empty tree map with default, sorted using our default comparator.
TreeMapWithDefault(java.util.Comparator<java.lang.Object> c)
          Deprecated. Constructs a new empty tree map with default, sorted according to the specified comparator.
TreeMapWithDefault(java.util.Map<?,?> m)
          Deprecated. Constructs a new tree map with default, containing all the mappings in the specified map, sorted using our default comparator.
TreeMapWithDefault(java.util.SortedMap<?,?> m)
          Deprecated. Constructs a new tree map with default, containing all the mappings in the specified map, sorted using our default comparator.
 
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.TreeMap
clear, clone, comparator, containsKey, containsValue, entrySet, firstKey, get, headMap, keySet, lastKey, put, putAll, remove, size, subMap, tailMap, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, isEmpty, 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

TreeMapWithDefault

public TreeMapWithDefault()
Deprecated. 
Constructs a new empty tree map with default, sorted using our default comparator.


TreeMapWithDefault

public TreeMapWithDefault(java.util.SortedMap<?,?> m)
Deprecated. 
Constructs a new tree map with default, containing all the mappings in the specified map, sorted using our default comparator.

Parameters:
m - the map to copy into this map

TreeMapWithDefault

public TreeMapWithDefault(java.util.Comparator<java.lang.Object> c)
Deprecated. 
Constructs a new empty tree map with default, sorted according to the specified comparator.

Parameters:
c - the compartor to use for sorting this map

TreeMapWithDefault

public TreeMapWithDefault(java.util.Map<?,?> m)
Deprecated. 
Constructs a new tree map with default, containing all the mappings in the specified map, sorted using our default comparator.

Parameters:
m - 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.