Package net.fortuna.ical4j.model
Class ComponentList<T extends Component>
- java.lang.Object
-
- net.fortuna.ical4j.model.ComponentList<T>
-
- All Implemented Interfaces:
Serializable
,ContentCollection<T>
public class ComponentList<T extends Component> extends Object implements ContentCollection<T>
$Id$ [Apr 5, 2004] Defines a list of iCalendar components.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ComponentList()
Default constructor.ComponentList(List<? extends T> components)
Create new component list containing the components in the specified list.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ContentCollection<T>
add(T content)
ContentCollection<T>
addAll(Collection<T> content)
boolean
equals(Object o)
List<T>
getAll()
<R extends T>
Optional<R>getComponent(String aName)
Deprecated.<C extends T>
List<C>getComponents(String... name)
Deprecated.useComponentList#get(String)
int
hashCode()
ContentCollection<T>
remove(T content)
ContentCollection<T>
removeAll(String... name)
ContentCollection<T>
replace(T content)
String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.fortuna.ical4j.model.ContentCollection
get, getFirst, getRequired
-
-
-
-
Method Detail
-
add
public ContentCollection<T> add(T content)
- Specified by:
add
in interfaceContentCollection<T extends Component>
-
addAll
public ContentCollection<T> addAll(Collection<T> content)
- Specified by:
addAll
in interfaceContentCollection<T extends Component>
-
remove
public ContentCollection<T> remove(T content)
- Specified by:
remove
in interfaceContentCollection<T extends Component>
-
removeAll
public ContentCollection<T> removeAll(String... name)
- Specified by:
removeAll
in interfaceContentCollection<T extends Component>
-
replace
public ContentCollection<T> replace(T content)
- Specified by:
replace
in interfaceContentCollection<T extends Component>
-
getAll
public List<T> getAll()
- Specified by:
getAll
in interfaceContentCollection<T extends Component>
-
getComponent
@Deprecated public final <R extends T> Optional<R> getComponent(String aName)
Deprecated.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
@Deprecated public final <C extends T> List<C> getComponents(String... name)
Deprecated.useComponentList#get(String)
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
-
-