Class MappableInfoList<T extends HasName>

    • Field Summary

      • Fields inherited from class java.util.AbstractList

        modCount
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(int index, T element)  
      boolean add​(T element)  
      boolean addAll​(int index, java.util.Collection<? extends T> c)  
      boolean addAll​(java.util.Collection<? extends T> c)  
      java.util.Map<java.lang.String,​T> asMap()
      Get an index for this list, as a map from the name of each list item (obtained by calling getName() on each list item) to the list item.
      void clear()  
      boolean containsName​(java.lang.String name)
      Check if this list contains an item with the given name.
      T get​(java.lang.String name)
      Get the list item with the given name, or null if not found.
      java.util.Iterator<T> iterator()  
      java.util.ListIterator<T> listIterator()  
      T remove​(int index)  
      boolean remove​(java.lang.Object o)  
      boolean removeAll​(java.util.Collection<?> c)  
      boolean retainAll​(java.util.Collection<?> c)  
      T set​(int index, T element)  
      • Methods inherited from class java.util.ArrayList

        clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, lastIndexOf, listIterator, removeIf, removeRange, replaceAll, size, sort, spliterator, subList, toArray, toArray, trimToSize
      • Methods inherited from class java.util.AbstractCollection

        containsAll, toString
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Collection

        parallelStream, stream, toArray
      • Methods inherited from interface java.util.List

        containsAll
    • Method Detail

      • asMap

        public java.util.Map<java.lang.String,​T> asMap()
        Get an index for this list, as a map from the name of each list item (obtained by calling getName() on each list item) to the list item.
        Returns:
        An index for this list, as a map from the name of each list item (obtained by calling getName() on each list item) to the list item.
      • containsName

        public boolean containsName​(java.lang.String name)
        Check if this list contains an item with the given name.
        Parameters:
        name - The name to search for.
        Returns:
        true if this list contains an item with the given name.
      • get

        public T get​(java.lang.String name)
        Get the list item with the given name, or null if not found.
        Parameters:
        name - The name to search for.
        Returns:
        The list item with the given name, or null if not found.
      • add

        public boolean add​(T element)
        Specified by:
        add in interface java.util.Collection<T>
        Specified by:
        add in interface java.util.List<T>
        Overrides:
        add in class java.util.ArrayList<T>
      • add

        public void add​(int index,
                        T element)
        Specified by:
        add in interface java.util.List<T>
        Overrides:
        add in class java.util.ArrayList<T>
      • remove

        public boolean remove​(java.lang.Object o)
        Specified by:
        remove in interface java.util.Collection<T>
        Specified by:
        remove in interface java.util.List<T>
        Overrides:
        remove in class java.util.ArrayList<T>
      • remove

        public T remove​(int index)
        Specified by:
        remove in interface java.util.List<T>
        Overrides:
        remove in class java.util.ArrayList<T>
      • addAll

        public boolean addAll​(java.util.Collection<? extends T> c)
        Specified by:
        addAll in interface java.util.Collection<T>
        Specified by:
        addAll in interface java.util.List<T>
        Overrides:
        addAll in class java.util.ArrayList<T>
      • addAll

        public boolean addAll​(int index,
                              java.util.Collection<? extends T> c)
        Specified by:
        addAll in interface java.util.List<T>
        Overrides:
        addAll in class java.util.ArrayList<T>
      • removeAll

        public boolean removeAll​(java.util.Collection<?> c)
        Specified by:
        removeAll in interface java.util.Collection<T>
        Specified by:
        removeAll in interface java.util.List<T>
        Overrides:
        removeAll in class java.util.ArrayList<T>
      • retainAll

        public boolean retainAll​(java.util.Collection<?> c)
        Specified by:
        retainAll in interface java.util.Collection<T>
        Specified by:
        retainAll in interface java.util.List<T>
        Overrides:
        retainAll in class java.util.ArrayList<T>
      • clear

        public void clear()
        Specified by:
        clear in interface java.util.Collection<T>
        Specified by:
        clear in interface java.util.List<T>
        Overrides:
        clear in class java.util.ArrayList<T>
      • set

        public T set​(int index,
                     T element)
        Specified by:
        set in interface java.util.List<T>
        Overrides:
        set in class java.util.ArrayList<T>
      • iterator

        public java.util.Iterator<T> iterator()
        Specified by:
        iterator in interface java.util.Collection<T>
        Specified by:
        iterator in interface java.lang.Iterable<T>
        Specified by:
        iterator in interface java.util.List<T>
        Overrides:
        iterator in class java.util.ArrayList<T>
      • listIterator

        public java.util.ListIterator<T> listIterator()
        Specified by:
        listIterator in interface java.util.List<T>
        Overrides:
        listIterator in class java.util.ArrayList<T>