Package net.fortuna.ical4j.model
Class PropertyList<T extends Property>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<T>
net.fortuna.ical4j.model.PropertyList<T>
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<T>,Collection<T>,List<T>,RandomAccess
$Id$ [Apr 5, 2004]
Defines a list of iCalendar properties.
- See Also:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.PropertyList(int initialCapacity) Creates a new instance with the specified initial capacity.PropertyList(PropertyList<? extends T> properties) Creates a deep copy of the specified property list. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanAdd a property to the list.final <C extends T>
PropertyList<C>getProperties(String... name) Returns a list of properties with the specified name.final <R> RgetProperty(String aName) Returns the first property of specified name.final booleanRemove a property from the list.final StringtoString()Methods inherited from class java.util.ArrayList
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
-
PropertyList
public PropertyList()Default constructor. -
PropertyList
public PropertyList(int initialCapacity) Creates a new instance with the specified initial capacity.- Parameters:
initialCapacity- the initial capacity of the list
-
PropertyList
public PropertyList(PropertyList<? extends T> properties) throws ParseException, IOException, URISyntaxException Creates a deep copy of the specified property list.- Parameters:
properties- a property list- Throws:
ParseException- where property data cannot be parsedIOException- where property data cannot be readURISyntaxException- where a property contains an invalid URI
-
-
Method Details
-
toString
- Overrides:
toStringin classAbstractCollection<T extends Property>
-
getProperty
Returns the first property of specified name.- Parameters:
aName- name of property to return- Returns:
- a property or null if no matching property found
-
getProperties
Returns a list of properties with the specified name.- Parameters:
name- name of properties to return- Returns:
- a property list
-
add
Add a property to the list. -
remove
Remove a property from the list.- Parameters:
property- the property to remove- Returns:
- true if the list contained the specified property
- See Also:
-