net.fortuna.ical4j.model

Class ComponentList

Implemented Interfaces:
Serializable

public class ComponentList
extends ArrayList
implements Serializable

$Id: ComponentList.java,v 1.12 2008/12/16 12:34:53 fortuna Exp $ [Apr 5, 2004] Defines a list of iCalendar components.

Constructor Summary

ComponentList()
Default constructor.
ComponentList(ComponentList components)
Creates a deep copy of the specified component list.
ComponentList(int initialCapacity)
Creates a new instance with the specified initial capacity.

Method Summary

boolean
add(Component component)
Add a component to the list.
boolean
add(Object arg0)
Overrides superclass to throw an IllegalArgumentException where argument is not a net.fortuna.ical4j.model.Component.
Component
getComponent(String aName)
Returns the first component of specified name.
ComponentList
getComponents(String name)
Returns a list containing all components with specified name.
boolean
remove(Component component)
Remove a component from the list.
String
toString()

Constructor Details

ComponentList

public ComponentList()
Default constructor.

ComponentList

public ComponentList(ComponentList components)
            throws ParseException,
                   IOException,
                   URISyntaxException
Creates a deep copy of the specified component list.
Parameters:
components -

ComponentList

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

Method Details

add

public final boolean add(Component component)
Add a component to the list.
Parameters:
component - the component to add
Returns:
true
See Also:
List.add(java.lang.Object)

add

public final boolean add(Object arg0)
Overrides superclass to throw an IllegalArgumentException where argument is not a net.fortuna.ical4j.model.Component.
See Also:
List.add(E)

getComponent

public final Component 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 ComponentList 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

remove

public final boolean remove(Component component)
Remove a component from the list.
Parameters:
component - the component to remove
Returns:
true if the list contained the specified component
See Also:
List.remove(java.lang.Object)

toString

public final String toString()
See Also:
java.util.AbstractCollection.toString()