org.millscript.commons.util.map
Class AbstractUMap<K,V>

java.lang.Object
  extended by org.millscript.commons.util.map.AbstractIMap<K,V>
      extended by org.millscript.commons.util.map.AbstractUMap<K,V>
All Implemented Interfaces:
org.millscript.commons.alert.AlertDecorator, IMap<K,V>, UMap<K,V>
Direct Known Subclasses:
AbstractEMap

public abstract class AbstractUMap<K,V>
extends AbstractIMap<K,V>
implements UMap<K,V>


Constructor Summary
AbstractUMap()
           
 
Method Summary
 void update(Maplet<? extends K,? extends V> entry)
          Updates this map with the specified mapping, changing the value associated with the maplets key to the maplets value.
 void updateAll(IMap<? extends K,? extends V> map)
          Updates all the mappings in this map with those in the specified map.
 
Methods inherited from class org.millscript.commons.util.map.AbstractIMap
contains, containsAll, decorate, equals, getDefault, hashCode, isEmtpy, keyList, mapletList, setDefault, sharedKeyList, sharedMapletList, sharedValueList, toString, valueList
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.millscript.commons.util.UMap
update
 
Methods inherited from interface org.millscript.commons.util.IMap
contains, contains, containsAll, containsKey, containsValue, equals, get, getDefault, hashCode, isEmtpy, iterator, keyList, mapletList, setDefault, size, valueList
 

Constructor Detail

AbstractUMap

public AbstractUMap()
Method Detail

update

public void update(Maplet<? extends K,? extends V> entry)
Description copied from interface: UMap
Updates this map with the specified mapping, changing the value associated with the maplets key to the maplets value. The map implementation may retain a reference to the given maplet as necessary.

This is generally equivalent to the following code, but may be more efficient in some implementations:


 someUMap.update( entry.getKey(), entry.getValue() );
 

Specified by:
update in interface UMap<K,V>
Parameters:
entry - the maplet to update this map with
See Also:
UMap.update(org.millscript.commons.util.Maplet)

updateAll

public void updateAll(IMap<? extends K,? extends V> map)
Description copied from interface: UMap
Updates all the mappings in this map with those in the specified map.

Specified by:
updateAll in interface UMap<K,V>
Parameters:
map - the map to copy all mappings from
See Also:
UMap.updateAll(org.millscript.commons.util.IMap)


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