Class IndexMap.ListIndexMap<K,​V>

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

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

      • ListIndexMap

        public ListIndexMap()
        Create a new list interface index map.
      • ListIndexMap

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

      • remove

        public boolean remove​(java.lang.Object o)
        Removes the first occurrence in this list of the specified element. If this list does not contain the element, it is unchanged. More formally, removes the element with the lowest index i such that
        Specified by:
        remove in interface java.util.Collection<K>
        Specified by:
        remove in interface java.util.List<K>
        Parameters:
        o - element to be removed from this list, if present.
        Returns:
        Throws:
        java.lang.ClassCastException - if the type of the specified element is incompatible with this list (optional).
        java.lang.NullPointerException - if the specified element is null and this list does not support null elements (optional).
      • clone

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