public class PeriodList
extends java.lang.Object
implements java.util.Set, 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(boolean utc,
boolean unmodifiable) |
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 period)
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 combines all the periods in the specified list to
this list.
|
boolean |
addAll(java.util.Collection arg0) |
void |
clear() |
boolean |
contains(java.lang.Object o) |
boolean |
containsAll(java.util.Collection arg0) |
boolean |
equals(java.lang.Object obj) |
TimeZone |
getTimeZone() |
int |
hashCode() |
boolean |
isEmpty() |
boolean |
isUnmodifiable() |
boolean |
isUtc()
Indicates whether this list is in local or UTC format.
|
java.util.Iterator |
iterator() |
PeriodList |
normalise()
Returns a normalised version of this period list.
|
boolean |
remove(java.lang.Object o) |
boolean |
remove(Period period)
Remove a period from the list.
|
boolean |
removeAll(java.util.Collection arg0) |
boolean |
retainAll(java.util.Collection arg0) |
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.
|
int |
size() |
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.Object[] |
toArray() |
java.lang.Object[] |
toArray(java.lang.Object[] arg0) |
java.lang.String |
toString() |
public PeriodList()
public PeriodList(boolean utc)
utc - indicates whether the period list is in UTC timepublic PeriodList(boolean utc,
boolean unmodifiable)
utc - indicates whether the period list is in UTC timepublic 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.lang.Objectpublic final boolean add(Period period)
period - the period to addList.add(java.lang.Object)public final boolean add(java.lang.Object period)
IllegalArgumentException
where argument is not a net.fortuna.ical4j.model.Period.add in interface java.util.Collectionadd in interface java.util.Setperiod - a period to add to the listList.add(Object)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 - a list of periods to addpublic final PeriodList subtract(PeriodList subtractions)
subtractions - a list of periods to subtract from this listpublic final boolean isUnmodifiable()
public final boolean isUtc()
public final void setUtc(boolean utc)
utc - The utc to set.public final void setTimeZone(TimeZone timeZone)
timeZone - the timezone for the period listpublic final TimeZone getTimeZone()
public final boolean addAll(java.util.Collection arg0)
addAll in interface java.util.CollectionaddAll in interface java.util.Setpublic final void clear()
clear in interface java.util.Collectionclear in interface java.util.Setpublic final boolean contains(java.lang.Object o)
contains in interface java.util.Collectioncontains in interface java.util.Setpublic final boolean containsAll(java.util.Collection arg0)
containsAll in interface java.util.CollectioncontainsAll in interface java.util.Setpublic final boolean isEmpty()
isEmpty in interface java.util.CollectionisEmpty in interface java.util.Setpublic final java.util.Iterator iterator()
iterator in interface java.lang.Iterableiterator in interface java.util.Collectioniterator in interface java.util.Setpublic final boolean remove(java.lang.Object o)
remove in interface java.util.Collectionremove in interface java.util.Setpublic final boolean removeAll(java.util.Collection arg0)
removeAll in interface java.util.CollectionremoveAll in interface java.util.Setpublic final boolean retainAll(java.util.Collection arg0)
retainAll in interface java.util.CollectionretainAll in interface java.util.Setpublic final int size()
size in interface java.util.Collectionsize in interface java.util.Setpublic final java.lang.Object[] toArray()
toArray in interface java.util.CollectiontoArray in interface java.util.Setpublic final java.lang.Object[] toArray(java.lang.Object[] arg0)
toArray in interface java.util.CollectiontoArray in interface java.util.Setpublic final boolean equals(java.lang.Object obj)
equals in interface java.util.Collectionequals in interface java.util.Setequals in class java.lang.Objectpublic final int hashCode()
hashCode in interface java.util.CollectionhashCode in interface java.util.SethashCode in class java.lang.ObjectCopyright © 2004-2015 Micronode. All Rights Reserved.