Class InfoList<T extends HasName>

Type Parameters:
T - the element type
All Implemented Interfaces:
Serializable, Cloneable, Iterable<T>, Collection<T>, List<T>, RandomAccess, SequencedCollection<T>
Direct Known Subclasses:
MappableInfoList, MethodInfoList

public class InfoList<T extends HasName> extends PotentiallyUnmodifiableList<T>
A list of named objects.
See Also:
  • Field Details

    • serialVersionUID

      static final long serialVersionUID
      serialVersionUID.
      See Also:
  • Constructor Details

    • InfoList

      InfoList()
      Constructor.
    • InfoList

      InfoList(int sizeHint)
      Constructor.
      Parameters:
      sizeHint - the size hint
    • InfoList

      InfoList(Collection<T> infoCollection)
      Constructor.
      Parameters:
      infoCollection - the initial elements.
  • Method Details

    • equals

      public boolean equals(Object o)
      Specified by:
      equals in interface Collection<T extends HasName>
      Specified by:
      equals in interface List<T extends HasName>
      Overrides:
      equals in class PotentiallyUnmodifiableList<T extends HasName>
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface Collection<T extends HasName>
      Specified by:
      hashCode in interface List<T extends HasName>
      Overrides:
      hashCode in class PotentiallyUnmodifiableList<T extends HasName>
    • getNames

      public List<String> getNames()
      Get the names of all items in this list, by calling getName() on each item in the list.
      Returns:
      The names of all items in this list, by calling getName() on each item in the list.
    • getAsStrings

      public List<String> getAsStrings()
      Get the String representations of all items in this list, by calling toString() on each item in the list.
      Returns:
      The String representations of all items in this list, by calling toString() on each item in the list.
    • getAsStringsWithSimpleNames

      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:
      The String representations of all items in this list, using only the simple names of any named classes.