public class PeriodList
extends java.util.TreeSet
implements java.io.Serializable
java.util.SortedSet interface period lists will always be
sorted according to natural ordering.| Constructor and Description |
|---|
PeriodList()
Default constructor.
|
PeriodList(boolean utc) |
PeriodList(java.lang.String aValue)
Parses the specified string representation to create a list of periods.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(java.lang.Object arg0)
Overrides superclass to throw an
IllegalArgumentException
where argument is not a net.fortuna.ical4j.model.Period. |
boolean |
add(Period period)
Add a period to the list.
|
PeriodList |
add(PeriodList periods)
A convenience method that adds all the periods in the specified list to
this list.
|
TimeZone |
getTimeZone() |
boolean |
isUtc()
Indicates whether this list is in local or UTC format.
|
PeriodList |
normalise()
Returns a normalised version of this period list.
|
boolean |
remove(Period period)
Remove a period 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.
|
PeriodList |
subtract(PeriodList subtractions)
Subtracts the intersection of this list with the specified list of
periods from this list and returns the results as a new period list.
|
java.lang.String |
toString() |
addAll, ceiling, clear, clone, comparator, contains, descendingIterator, descendingSet, first, floor, headSet, headSet, higher, isEmpty, iterator, last, lower, pollFirst, pollLast, remove, size, spliterator, subSet, subSet, tailSet, tailSetfinalize, getClass, notify, notifyAll, wait, wait, waitpublic PeriodList()
public PeriodList(boolean utc)
utc - public PeriodList(java.lang.String aValue)
throws java.text.ParseException
aValue - a string representation of a list of periodsjava.text.ParseException - thrown when an invalid string representation of a period list
is specifiedpublic final java.lang.String toString()
toString in class java.util.AbstractCollectionAbstractCollection.toString()public final boolean add(Period period)
period - the period to addList.add(java.lang.Object)public final boolean add(java.lang.Object arg0)
IllegalArgumentException
where argument is not a net.fortuna.ical4j.model.Period.add in interface java.util.Collectionadd in interface java.util.Setadd in class java.util.TreeSetjava.util.List#add(E)public final boolean remove(Period period)
period - the period to removeList.remove(java.lang.Object)public final PeriodList normalise()
public final PeriodList add(PeriodList periods)
periods - public final PeriodList subtract(PeriodList subtractions)
periods - a list of periods to subtract from this listpublic final boolean isUtc()
public final void setUtc(boolean utc)
utc - The utc to set.public final void setTimeZone(TimeZone timeZone)
timezone - public final TimeZone getTimeZone()