Class NamedListImpl<T extends Named>

All Implemented Interfaces:
Serializable, Cloneable, Iterable<T>, Collection<T>, List<T>, RandomAccess, SequencedCollection<T>, NamedList<T>

public class NamedListImpl<T extends Named> extends ArrayNamedListImpl<T>
Implementation of NamedList which uses ArrayList for storage and assumes that elements implement the Named interface.
Since:
May 23, 2007
Author:
jhyde
See Also:
  • Constructor Details

    • NamedListImpl

      public NamedListImpl(int initialCapacity)
      Creates an empty list with the specified initial capacity.
      Parameters:
      initialCapacity - the initial capacity of the list
      Throws:
      IllegalArgumentException - if the specified initial capacity is negative
    • NamedListImpl

      public NamedListImpl()
      Creates an empty list.
    • NamedListImpl

      public NamedListImpl(Collection<? extends T> c)
      Creates a list containing the elements of the specified collection, in the order they are returned by the collection's iterator.
      Parameters:
      c - the collection whose elements are to be placed into this list
      Throws:
      NullPointerException - if the specified collection is null
  • Method Details

    • getName

      public final String getName(Object t)
      Description copied from interface: NamedList
      Returns the name of a given element.
      Parameters:
      t - Element
      Returns:
      Name of element