Package io.github.classgraph
Class FieldInfoList
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<T>
-
- io.github.classgraph.FieldInfoList
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<FieldInfo>
,Collection<FieldInfo>
,List<FieldInfo>
,RandomAccess
public class FieldInfoList extends ArrayList<T>
A list ofFieldInfo
objects.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
FieldInfoList.FieldInfoFilter
Filter anFieldInfoList
using a predicate mapping anFieldInfo
object to a boolean, producing anotherFieldInfoList
for all items in the list for which the predicate is true.
-
Field Summary
-
Fields inherited from class java.util.AbstractList
modCount
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,T>
asMap()
boolean
containsName(String name)
FieldInfoList
filter(FieldInfoList.FieldInfoFilter filter)
Find the subset of theFieldInfo
objects in this list for which the given filter predicate is true.T
get(String name)
List<String>
getAsStrings()
List<String>
getNames()
-
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, 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
-
filter
public FieldInfoList filter(FieldInfoList.FieldInfoFilter filter)
Find the subset of theFieldInfo
objects in this list for which the given filter predicate is true.- Parameters:
filter
- TheFieldInfoList.FieldInfoFilter
to apply.- Returns:
- The subset of the
FieldInfo
objects in this list for which the given filter predicate is true.
-
asMap
public Map<String,T> asMap()
- Returns:
- An index for this list, as a map from the name of each list item (obtained by calling
getName
on the list item) to the list item.
-
containsName
public boolean containsName(String 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)
- Parameters:
name
- The name to search for.- Returns:
- The list item with the given name, or null if not found.
-
getNames
public List<String> getNames()
- Returns:
- The names of all packages in this list, by calling
PackageInfo.getName()
for each item in the list.
-
-