Class ComponentList<T extends Component>

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

public class ComponentList<T extends Component> extends ArrayList<T> implements Serializable
$Id$ [Apr 5, 2004] Defines a list of iCalendar components.
See Also:
  • Constructor Details

    • ComponentList

      public ComponentList()
      Default constructor.
    • ComponentList

      public ComponentList(int initialCapacity)
      Creates a new instance with the specified initial capacity.
      Parameters:
      initialCapacity - the initial capacity of the list
    • ComponentList

      public ComponentList(ComponentList<? extends T> components) throws ParseException, IOException, URISyntaxException
      Creates a deep copy of the specified component list.
      Parameters:
      components - a component list to copy
      Throws:
      IOException - where an error occurs reading component data
      ParseException - where component data cannot be parsed
      URISyntaxException - where component data contains an invalid URI
    • ComponentList

      public ComponentList(List<? extends T> components)
      Create new component list containing the components in the specified list.
      Parameters:
      components -
  • Method Details

    • toString

      public final String toString()
      Overrides:
      toString in class AbstractCollection<T extends Component>
    • getComponent

      public final T getComponent(String aName)
      Returns the first component of specified name.
      Parameters:
      aName - name of component to return
      Returns:
      a component or null if no matching component found
    • getComponents

      public final <C extends T> List<C> getComponents(String... name)
      Returns a list containing all components with specified name.
      Parameters:
      name - name of components to return
      Returns:
      a list of components with the matching name