T
- the element typepublic class MappableInfoList<T extends HasName> extends InfoList<T>
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
T element) |
boolean |
add(T element) |
boolean |
addAll(Collection<? extends T> c) |
boolean |
addAll(int index,
Collection<? extends T> c) |
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. |
void |
clear() |
boolean |
containsName(String name)
Check if this list contains an item with the given name.
|
T |
get(String name)
Get the list item with the given name, or null if not found.
|
Iterator<T> |
iterator() |
ListIterator<T> |
listIterator() |
T |
remove(int index) |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
T |
set(int index,
T element) |
equals, getAsStrings, getAsStringsWithSimpleNames, getNames, hashCode
clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, lastIndexOf, listIterator, removeIf, replaceAll, size, sort, spliterator, subList, toArray, toArray, trimToSize
containsAll, toString
containsAll
parallelStream, stream
public Map<String,T> asMap()
getName()
on each list item) to the list item.getName()
on each list item) to the list item.public boolean containsName(String name)
name
- The name to search for.public T get(String name)
name
- The name to search for.public boolean add(T element)
public void add(int index, T element)
public boolean remove(Object o)
public T remove(int index)
public boolean addAll(Collection<? extends T> c)
public boolean addAll(int index, Collection<? extends T> c)
public boolean removeAll(Collection<?> c)
public boolean retainAll(Collection<?> c)
public void clear()
public T set(int index, T element)
public Iterator<T> iterator()
public ListIterator<T> listIterator()
listIterator
in interface List<T>
listIterator
in class ArrayList<T>
Copyright © 2021. All rights reserved.