Class PropertyList<T extends Property>

All Implemented Interfaces:
Serializable, Cloneable, Iterable<T>, Collection<T>, List<T>, RandomAccess

public class PropertyList<T extends Property> extends ArrayList<T> implements Serializable
$Id$ [Apr 5, 2004] Defines a list of iCalendar properties.
See Also:
  • 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 parsed
      IOException - where property data cannot be read
      URISyntaxException - where a property contains an invalid URI
  • Method Details

    • toString

      public final String toString()
      Overrides:
      toString in class AbstractCollection<T extends Property>
    • getProperty

      public final <R> R getProperty(String aName)
      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

      public final <C extends T> PropertyList<C> getProperties(String... name)
      Returns a list of properties with the specified name.
      Parameters:
      name - name of properties to return
      Returns:
      a property list
    • add

      public final boolean add(T property)
      Add a property to the list.
      Specified by:
      add in interface Collection<T extends Property>
      Specified by:
      add in interface List<T extends Property>
      Overrides:
      add in class ArrayList<T extends Property>
      Parameters:
      property - the property to add
      Returns:
      true
      See Also:
    • remove

      public final boolean remove(Property property)
      Remove a property from the list.
      Parameters:
      property - the property to remove
      Returns:
      true if the list contained the specified property
      See Also: