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
$Id$ [Apr 5, 2004]
Defines a list of iCalendar components.
- See Also:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount -
Constructor Summary
ConstructorsConstructorDescriptionDefault 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
Modifier and TypeMethodDescriptionfinal TgetComponent(String aName) Returns the first component of specified name.getComponents(String... name) Returns a list containing all components with specified name.final StringtoString()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, trimToSizeMethods inherited from class java.util.AbstractCollection
containsAllMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, stream, toArrayMethods inherited from interface java.util.List
containsAll
-
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 dataParseException- where component data cannot be parsedURISyntaxException- where component data contains an invalid URI
-
ComponentList
Create new component list containing the components in the specified list.- Parameters:
components-
-
-
Method Details
-
toString
- Overrides:
toStringin classAbstractCollection<T extends Component>
-
getComponent
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
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
-