Top Description Fields Constructors Methods
io.github.classgraph

public Class InfoList<T extends HasName>

extends PotentiallyUnmodifiableList<T extends HasName>
Class Inheritance
Known Direct Subclasses
io.github.classgraph.MappableInfoList, io.github.classgraph.MethodInfoList
Type Parameters
<T>
the element type
Imports
java.util.ArrayList, .Collection, .Collections, .List

A list of named objects.

Field Summary

Modifier and TypeField and Description
pack-priv static final long
Inherited from io.github.classgraph.PotentiallyUnmodifiableList:
modifiable

Constructor Summary

AccessConstructor and Description
pack-priv
InfoList()

Constructor.

pack-priv
InfoList(final int
the size hint
sizeHint
)

Constructor.

pack-priv
InfoList(final Collection<T>
the initial elements.
infoCollection
)

Constructor.

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(final Object
the object to be compared for equality with this list
o
)

Overrides io.github.classgraph.PotentiallyUnmodifiableList.equals.

Implements java.util.List.equals, java.util.Collection.equals.

Compares the specified object with this list for equality.

public List<String>

Returns:

The String representations of all items in this list, by calling toString() on each item in the list.
getAsStrings
()

Get the String representations of all items in this list, by calling toString() on each item in the list.

public List<String>

Returns:

The String representations of all items in this list, using only the simple names of any named classes.
getAsStringsWithSimpleNames
()

Get the String representations of all items in this list, using only simple names of any named classes, by calling ScanResultObject#toStringWithSimpleNames() if the object is a subclass of ScanResultObject (e.g. ClassInfo, MethodInfo or FieldInfo object), otherwise calling toString(), for each item in the list.

public List<String>

Returns:

The names of all items in this list, by calling getName() on each item in the list.
getNames
()

Get the names of all items in this list, by calling getName() on each item in the list.

public int
Inherited from io.github.classgraph.PotentiallyUnmodifiableList:
addaddaddAlladdAllcleariteratorlistIteratormakeUnmodifiableremoveremoveremoveAllretainAllset

Field Detail

serialVersionUIDback to summary
pack-priv static final long serialVersionUID

Hides io.github.classgraph.PotentiallyUnmodifiableList.serialVersionUID.

serialVersionUID.

Constructor Detail

InfoListback to summary
pack-priv InfoList()

Constructor.

InfoListback to summary
pack-priv InfoList(final int sizeHint)

Constructor.

Parameters
sizeHint:int

the size hint

InfoListback to summary
pack-priv InfoList(final Collection<T> infoCollection)

Constructor.

Parameters
infoCollection:Collection<T>

the initial elements.

Method Detail

equalsback to summary
public boolean equals(final Object o)

Overrides io.github.classgraph.PotentiallyUnmodifiableList.equals.

Implements java.util.List.equals, java.util.Collection.equals.

Doc from java.util.ArrayList.equals.

Compares the specified object with this list for equality. Returns true if and only if the specified object is also a list, both lists have the same size, and all corresponding pairs of elements in the two lists are equal. (Two elements e1 and e2 are equal if Objects.equals(e1, e2).) In other words, two lists are defined to be equal if they contain the same elements in the same order. This definition ensures that the equals method works properly across different implementations of the List interface.

Parameters
o:Object

Doc from java.util.List.equals.

the object to be compared for equality with this list

Returns:boolean

Doc from java.util.List.equals.

true if the specified object is equal to this list

Annotations
@Override
getAsStringsback to summary
public List<String> getAsStrings()

Get the String representations of all items in this list, by calling toString() on each item in the list.

Returns:List<String>

The String representations of all items in this list, by calling toString() on each item in the list.

getAsStringsWithSimpleNamesback to summary
public List<String> getAsStringsWithSimpleNames()

Get the String representations of all items in this list, using only simple names of any named classes, by calling ScanResultObject#toStringWithSimpleNames() if the object is a subclass of ScanResultObject (e.g. ClassInfo, MethodInfo or FieldInfo object), otherwise calling toString(), for each item in the list.

Returns:List<String>

The String representations of all items in this list, using only the simple names of any named classes.

getNamesback to summary
public List<String> getNames()

Get the names of all items in this list, by calling getName() on each item in the list.

Returns:List<String>

The names of all items in this list, by calling getName() on each item in the list.

hashCodeback to summary
public int hashCode()

Overrides io.github.classgraph.PotentiallyUnmodifiableList.hashCode.

Implements java.util.List.hashCode, java.util.Collection.hashCode.

Doc from java.util.ArrayList.hashCode.

Returns the hash code value for this list. The hash code of a list is defined to be the result of the following calculation:

int hashCode = 1;
    for (E e : list)
        hashCode = 31*hashCode + (e==null ? 0 : e.hashCode());
This ensures that list1.equals(list2) implies that list1.hashCode()==list2.hashCode() for any two lists, list1 and list2, as required by the general contract of Object#hashCode.
Returns:int

Doc from java.util.List.hashCode.

the hash code value for this list

Annotations
@Override