Top Description Methods
net.fortuna.ical4j.model

public Interface ContentCollection<T extends Content>

extends Serializable
Known Direct Implementers
net.fortuna.ical4j.model.ParameterList, net.fortuna.ical4j.model.PropertyList, net.fortuna.ical4j.model.ComponentList
Imports
java.io.Serializable, java.util.Arrays, .Collection, .List, .Optional, java.util.function.Predicate, java.util.stream.Collectors

Implementors of this interface support the immutable collection contract specified by this interface. The contract states that any mutation function will not modify the underlying collection, but rather will return a copy of the collection with the applied mutation.

Method Summary

Modifier and TypeMethod and Description
public ContentCollection<T>
add(T content)

public ContentCollection<T>
addAll(Collection<T> content)

public default <
content type
R extends T
>
List<R>

Returns:

a list of elements less than or equal to the elements in this collection
get
(String...
a list of zero or more names to match
names
)

Return a list of elements filtered by name.

public List<T>
public default <R extends T> Optional<R>
public default <R extends T> R
public ContentCollection<T>
remove(T content)

public ContentCollection<T>
removeAll(String... name)

public ContentCollection<T>
removeIf(Predicate<T> filter)

public ContentCollection<T>
replace(T content)

Method Detail

addback to summary
public ContentCollection<T> add(T content)
addAllback to summary
public ContentCollection<T> addAll(Collection<T> content)
getback to summary
public default <R extends T> List<R> get(String... names)

Return a list of elements filtered by name. If no names are specified return all elements.

Parameters
<R>
content type
names:String[]

a list of zero or more names to match

Returns:List<R>

a list of elements less than or equal to the elements in this collection

Annotations
@SuppressWarnings:unchecked
getAllback to summary
public List<T> getAll()
getFirstback to summary
public default <R extends T> Optional<R> getFirst(String name)
Annotations
@SuppressWarnings:unchecked
getRequiredback to summary
public default <R extends T> R getRequired(String name) throws ConstraintViolationException
Annotations
@SuppressWarnings:unchecked
removeback to summary
public ContentCollection<T> remove(T content)
removeAllback to summary
public ContentCollection<T> removeAll(String... name)
removeIfback to summary
public ContentCollection<T> removeIf(Predicate<T> filter)
replaceback to summary
public ContentCollection<T> replace(T content)