org.millscript.commons.util
Interface EMap<K,V>

All Superinterfaces:
IMap<K,V>, UMap<K,V>
All Known Subinterfaces:
MutableSortedList
All Known Implementing Classes:
AbstractEMap, AbstractEReferenceHashMap, AbstractETreeMap, EArrayMap, EBinaryTreeMap, EHashMap, ELinkedHashMap, ERedBlackTreeMap, ESoftHashMap, EWeakHashMap

public interface EMap<K,V>
extends UMap<K,V>

This interface describes an extensible map, one which can have mappings inserted, removed and changed.


Method Summary
 void insert(K key, V value)
          Inserts the specified key-value pair into this map, associating the key with the value.
 void insert(Maplet<? extends K,? extends V> entry)
          Inserts the specified mapping into this map, associating the maplets key with its value.
 void insertAll(IMap<? extends K,? extends V> map)
          Inserts all the mappings from the specified map into this map.
 void remove(K key, V value)
          Removes the specified key-value pair from this map.
 void remove(Maplet<? extends K,? extends V> entry)
          Removes the specified mapping from this map.
 void removeAll()
          Removes all the mappings from this map.
 void removeAll(IMap<? extends K,? extends V> map)
          Removes all the mappings in the specified map from this one.
 void removeKey(K key)
          Removes the mapping for the specified key.
 void removeValue(V value)
          Removes any mappings from this map which map to the specified value.
 
Methods inherited from interface org.millscript.commons.util.UMap
update, update, updateAll
 
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
 

Method Detail

insert

void insert(Maplet<? extends K,? extends V> entry)
Inserts the specified mapping into this map, associating the maplets key with its value. The map implementation may retain a reference to the given maplet as necessary.

Parameters:
entry - the maplet to insert into this map

insert

void insert(K key,
            V value)
Inserts the specified key-value pair into this map, associating the key with the value.

Parameters:
key - the key to associate the value with
value - the value to associate the key with

insertAll

void insertAll(IMap<? extends K,? extends V> map)
Inserts all the mappings from the specified map into this map.

Parameters:
map - the map to copy all mappings from

remove

void remove(Maplet<? extends K,? extends V> entry)
Removes the specified mapping from this map. For this removal to be successful the specified mapping must exist in this map.

Parameters:
entry - the maplet to remove from this map

remove

void remove(K key,
            V value)
Removes the specified key-value pair from this map. For this removal to be successful the specified mapping must exist in this map.

Parameters:
key - the key to remove from this map if it is associated with the specified value
value - the value to remove from this map if it is associated with the specified key

removeAll

void removeAll()
Removes all the mappings from this map.


removeAll

void removeAll(IMap<? extends K,? extends V> map)
Removes all the mappings in the specified map from this one. This map will be left containing all the mappings that are not present in the specified map.

Parameters:
map - the map whose mappings to remove from this map

removeKey

void removeKey(K key)
Removes the mapping for the specified key.

Parameters:
key - the key to remove from this map

removeValue

void removeValue(V value)
Removes any mappings from this map which map to the specified value.

Parameters:
value - the value to remove from this map


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