Package net.fortuna.ical4j.model
Class ComponentList<T extends Component>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<T>
-
- net.fortuna.ical4j.model.ComponentList<T>
-
- 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:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.AbstractList
modCount
-
-
Constructor Summary
Constructors Constructor Description ComponentList()
Default constructor.ComponentList(int initialCapacity)
Creates a new instance with the specified initial capacity.ComponentList(List<? extends T> components)
Create new component list containing the components in the specified list.ComponentList(ComponentList<? extends T> components)
Creates a deep copy of the specified component list.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
getComponent(String aName)
Returns the first component of specified name.<C extends T>
List<C>getComponents(String name)
Returns a list containing all components with specified name.String
toString()
-
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
-
Methods inherited from class java.util.AbstractCollection
containsAll
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, stream, toArray
-
Methods inherited from interface java.util.List
containsAll
-
-
-
-
Constructor Detail
-
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 dataParseException
- where component data cannot be parsedURISyntaxException
- where component data contains an invalid URI
-
-
Method Detail
-
toString
public final String toString()
- Overrides:
toString
in classAbstractCollection<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
-
-