public class PeriodList extends java.lang.Object implements java.util.Set<Period>, 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(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<? extends Period> 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<Period> |
iterator() |
PeriodList |
normalise()
Returns a normalised version of this period list.
|
boolean |
remove(java.lang.Object 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() |
<T> T[] |
toArray(T[] 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)
public final boolean remove(java.lang.Object period)
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 isUtc()
public boolean isUnmodifiable()
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 boolean addAll(java.util.Collection<? extends Period> arg0)
public void clear()
public boolean contains(java.lang.Object o)
public boolean containsAll(java.util.Collection<?> arg0)
public boolean isEmpty()
public java.util.Iterator<Period> iterator()
public boolean removeAll(java.util.Collection<?> arg0)
public boolean retainAll(java.util.Collection<?> arg0)
public int size()
public java.lang.Object[] toArray()
public <T> T[] toArray(T[] arg0)
public boolean equals(java.lang.Object obj)