Class MappableInfoList<T extends HasName>
java.lang.Object
java.util.AbstractCollection<T>
java.util.AbstractList<T>
java.util.ArrayList<T>
io.github.classgraph.InfoList<T>
io.github.classgraph.MappableInfoList<T>
- Type Parameters:
T- the element type
- All Implemented Interfaces:
Serializable, Cloneable, Iterable<T>, Collection<T>, List<T>, RandomAccess, SequencedCollection<T>
- Direct Known Subclasses:
AnnotationInfoList, AnnotationParameterValueList, ClassInfoList, FieldInfoList, ModuleInfoList, PackageInfoList
-
Field Summary
Fields inherited from class AbstractList
modCount -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanbooleanaddAll(int index, Collection<? extends T> c) booleanaddAll(Collection<? extends T> c) asMap()Get an index for this list, as a map from the name of each list item (obtained by callinggetName()on each list item) to the list item.voidclear()booleancontainsName(String name) Check if this list contains an item with the given name.Get the list item with the given name, or null if not found.iterator()remove(int index) booleanbooleanremoveAll(Collection<?> c) booleanretainAll(Collection<?> c) Methods inherited from class InfoList
equals, getAsStrings, getAsStringsWithSimpleNames, getNames, hashCodeMethods inherited from class ArrayList
addFirst, addLast, clone, contains, ensureCapacity, forEach, get, getFirst, getLast, indexOf, isEmpty, lastIndexOf, listIterator, removeFirst, removeIf, removeLast, removeRange, replaceAll, size, sort, spliterator, subList, toArray, toArray, trimToSizeMethods inherited from class AbstractCollection
containsAll, toStringMethods inherited from interface Collection
parallelStream, stream, toArrayMethods inherited from interface List
containsAll, reversed
-
Method Details
-
asMap
Get an index for this list, as a map from the name of each list item (obtained by callinggetName()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
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
-
add
-
add
-
remove
-
remove
-
addAll
-
addAll
-
removeAll
-
retainAll
-
clear
-
set
-
iterator
-
listIterator
- Specified by:
listIteratorin interfaceList<T>- Overrides:
listIteratorin classArrayList<T>
-