Class IndexMap.MapIndexMap<K,​V>

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.util.Map<K,​V>
    Enclosing class:
    IndexMap<K,​V>

    public static class IndexMap.MapIndexMap<K,​V>
    extends IndexMap<K,​V>
    implements java.util.Map<K,​V>
    Provide access to the index map via map interface.
    See Also:
    Serialized Form
    • Constructor Detail

      • MapIndexMap

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

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

      • remove

        public V remove​(java.lang.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 (key==null ? k==null : key.equals(k)), that mapping is removed. (The map can contain at most one such mapping.)
        Specified by:
        remove in interface java.util.Map<K,​V>
        Parameters:
        key - key whose mapping is to be removed from the map.
        Returns:
        previous value associated with specified key, or
        Throws:
        java.lang.ClassCastException - if the key is of an inappropriate type for this map (optional).
        java.lang.NullPointerException - if the key is
      • clone

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