Class MappableInfoList<T extends HasName>

    • Method Detail

      • asMap

        public Map<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​(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​(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 Collection<T>
        Specified by:
        add in interface List<T>
        Overrides:
        add in class ArrayList<T>
      • add

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

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

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