Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.fortuna.ical4j.model
Class DateList

    java.lang.Object
      java.util.AbstractCollection<E>
          java.util.AbstractList<E>
              java.util.ArrayList
                  net.fortuna.ical4j.model.DateList

All Implemented Interfaces:
  Serializable, Cloneable, Iterable, Collection, List, RandomAccess

    public class DateList

extends ArrayList
implements Serializable

Defines a list of iCalendar dates. If no value type is specified a list defaults to DATE-TIME instances.

Author:
  Ben Fortuna
See Also:
  Serialized Form

Field Summary

Fields inherited from class java.util.AbstractList
`modCount`

Constructor Summary
`DateList()` Default constructor.
`DateList(DateList list, Value type)` Constructs a new date list of the specified type containing the dates in the specified list.
`DateList(int initialCapacity)` Creates a new instance with the specified initial capacity.
`DateList(String aValue, Value aType)`
`DateList(String aValue, Value aType, TimeZone timezone)` Parses the specified string representation to create a list of dates.
`DateList(Value aType)`
`DateList(Value aType, TimeZone timezone)` Default constructor.

Method Summary
`boolean` | `add(Date date)` Add a date to the list.
`boolean` | `add(Object arg0)` Overrides superclass to throw an `IllegalArgumentException` Where argument is not a `net.fortuna.ical4j.model.Date`.
`TimeZone` | `getTimeZone()`
`Value` | `getType()` Returns the VALUE parameter specifying the type of dates (ie.
`boolean` | `isUtc()` Indicates whether this list is in local or UTC format.
`boolean` | `remove(Date date)` Remove a date from the list.
`void` | `setTimeZone(TimeZone timeZone)` Applies the specified timezone to all dates in the list.
`void` | `setUtc(boolean utc)` Sets whether this list is in UTC or local time format.
`String` | `toString()`

Methods inherited from class java.util.ArrayList
`add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize`

Methods inherited from class java.util.AbstractList
`equals, hashCode, iterator, listIterator, listIterator, subList`

Methods inherited from class java.util.AbstractCollection
`containsAll, removeAll, retainAll`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Methods inherited from interface java.util.List
`containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList`

Constructor Detail

### DateList

    public DateList()

  Default constructor.

### DateList

    public DateList(int initialCapacity)

  Creates a new instance with the specified initial capacity.

  Parameters:
    `initialCapacity` - the initial capacity of the list

### DateList

    public DateList(Value aType)

Parameters:
  `aType` -

### DateList

    public DateList(Value aType,
                    TimeZone timezone)

  Default constructor.

  Parameters:
    `aType` - specifies the type of dates (either date or date-time)

### DateList

    public DateList(String aValue,
                    Value aType)
             throws ParseException

Parameters:
  `aValue` -
  `aType` -
Throws:
  `ParseException`

### DateList

    public DateList(String aValue,
                    Value aType,
                    TimeZone timezone)
             throws ParseException

  Parses the specified string representation to create a list of dates.

  Parameters:
    `aValue` - a string representation of a list of dates
    `aType` - specifies the type of dates (either date or date-time)
  Throws:
    `ParseException` - if an invalid date representation exists in the date list string

### DateList

    public DateList(DateList list,
                    Value type)

  Constructs a new date list of the specified type containing the dates in the specified list.

  Parameters:
    `list` - a list of dates to include in the new list
    `type` - the type of the new list

Method Detail

### toString

    public final String toString()

  Overrides:
    `toString` in class `AbstractCollection`
  See Also:
    `AbstractCollection.toString()`

### add

    public final boolean add(Date date)

  Add a date to the list. The date will be updated to reflect the timezone of this list.

  Parameters:
    `date` - the date to add
  Returns:
    true
  See Also:
    `List#add(java.lang.Object)`

### add

    public final boolean add(Object arg0)

  Overrides superclass to throw an `IllegalArgumentException` Where argument is not a `net.fortuna.ical4j.model.Date`.

  Specified by:
    `add` in interface `Collection`
  Specified by:
    `add` in interface `List`
  Overrides:
    `add` in class `ArrayList`
  See Also:
    `List#add(E)`

### remove

    public final boolean remove(Date date)

  Remove a date from the list.

  Parameters:
    `date` - the date to remove
  Returns:
    true if the list contained the specified date
  See Also:
    `List#remove(java.lang.Object)`

### getType

    public final Value getType()

  Returns the VALUE parameter specifying the type of dates (ie. date or date-time) stored in this date list.

  Returns:
    Returns a Value parameter.

### isUtc

    public final boolean isUtc()

  Indicates whether this list is in local or UTC format. This property will have no affect if the type of the list is not DATE-TIME.

  Returns:
    Returns true if in UTC format, otherwise false.

### setUtc

    public final void setUtc(boolean utc)

  Sets whether this list is in UTC or local time format.

  Parameters:
    `utc` - The utc to set.

### setTimeZone

    public final void setTimeZone(TimeZone timeZone)

  Applies the specified timezone to all dates in the list. All dates added to this list will also have this timezone applied.

  Parameters:
    `timezone` -

### getTimeZone

    public final TimeZone getTimeZone()

  Returns:
    Returns the timeZone.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2007 Modularity. All Rights Reserved.