Class IndexMap.MapIndexMap<K,V>

java.lang.Object
jadex.collection.IndexMap<K,V>
jadex.collection.IndexMap.MapIndexMap<K,V>
All Implemented Interfaces:
Serializable, Cloneable, Map<K,V>
Enclosing class:
IndexMap<K,V>

public static class IndexMap.MapIndexMap<K,V> extends IndexMap<K,V> implements Map<K,V>
Provide access to the index map via map interface.
See Also:
  • Constructor Details

    • MapIndexMap

      public MapIndexMap()
      Create a new map interface index map.
    • MapIndexMap

      public MapIndexMap(List<K> list, Map<K,V> map)
      Create a new map interface index map.
      Parameters:
      list - The list.
      map - The map.
  • Method Details

    • remove

      public V remove(Object key)
      Removes the mapping for this key from this map if it is present. More formally, if this map contains a mapping from key k to value v such that (key==null ? k==null : key.equals(k)), that mapping is removed. (The map can contain at most one such mapping.)

      Returns the value to which the map previously associated the key, or null if the map contained no mapping for this key. (A null return can also indicate that the map previously associated null with the specified key if the implementation supports null values.) The map will not contain a mapping for the specified key once the call returns.

      Specified by:
      remove in interface Map<K,V>
      Parameters:
      key - key whose mapping is to be removed from the map.
      Returns:
      previous value associated with specified key, or null if there was no mapping for key.
      Throws:
      ClassCastException - if the key is of an inappropriate type for this map (optional).
      NullPointerException - if the key is null and this map does not not permit null keys (optional).
    • clone

      public Object clone()
      Clone an index map.
      Overrides:
      clone in class IndexMap<K,V>