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.Object
public 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.Collection
add
in interface java.util.Set
period
- 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.Collection
addAll
in interface java.util.Set
public final void clear()
clear
in interface java.util.Collection
clear
in interface java.util.Set
public final boolean contains(java.lang.Object o)
contains
in interface java.util.Collection
contains
in interface java.util.Set
public final boolean containsAll(java.util.Collection arg0)
containsAll
in interface java.util.Collection
containsAll
in interface java.util.Set
public final boolean isEmpty()
isEmpty
in interface java.util.Collection
isEmpty
in interface java.util.Set
public final java.util.Iterator iterator()
iterator
in interface java.lang.Iterable
iterator
in interface java.util.Collection
iterator
in interface java.util.Set
public final boolean remove(java.lang.Object o)
remove
in interface java.util.Collection
remove
in interface java.util.Set
public final boolean removeAll(java.util.Collection arg0)
removeAll
in interface java.util.Collection
removeAll
in interface java.util.Set
public final boolean retainAll(java.util.Collection arg0)
retainAll
in interface java.util.Collection
retainAll
in interface java.util.Set
public final int size()
size
in interface java.util.Collection
size
in interface java.util.Set
public final java.lang.Object[] toArray()
toArray
in interface java.util.Collection
toArray
in interface java.util.Set
public final java.lang.Object[] toArray(java.lang.Object[] arg0)
toArray
in interface java.util.Collection
toArray
in interface java.util.Set
public final boolean equals(java.lang.Object obj)
equals
in interface java.util.Collection
equals
in interface java.util.Set
equals
in class java.lang.Object
public final int hashCode()
hashCode
in interface java.util.Collection
hashCode
in interface java.util.Set
hashCode
in class java.lang.Object
Copyright © 2004-2015 Micronode. All Rights Reserved.