|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbiweekly.property.ICalProperty
biweekly.property.FreeBusy
public class FreeBusy
Defines a person's availability over certain time periods (for example, "busy" between 1pm-3pm and 4pm-5pm). Note that this property can contain multiple time periods, but only one availability type may be defined (e.g. "busy" or "free").
Examples:
FreeBusy freebusy = new FreeBusy(); freebusy.setType(FreeBusyType.BUSY); Date onePM = ... Date threePM = ... freebusy.addValue(onePM, threePM); Date fourPM = ... Duration oneHour = Duration.builder().hours(1).build(); freeBusy.addValue(fourPM, oneHour);
| Field Summary |
|---|
| Fields inherited from class biweekly.property.ICalProperty |
|---|
parameters |
| Constructor Summary | |
|---|---|
FreeBusy()
|
|
| Method Summary | |
|---|---|
void |
addValue(Date start,
Date end)
Adds a time period. |
void |
addValue(Date start,
Duration duration)
Adds a time period. |
FreeBusyType |
getType()
Gets the person's status over the time periods that are specified in this property (for example, "free" or "busy"). |
List<Period> |
getValues()
Gets all time periods. |
void |
setType(FreeBusyType fbType)
Sets the person's status over the time periods that are specified in this property (for example, "free" or "busy"). |
protected void |
validate(List<ICalComponent> components,
List<String> warnings)
Checks the property for data consistency problems or deviations from the spec. |
| Methods inherited from class biweekly.property.ICalProperty |
|---|
addParameter, getParameter, getParameters, getParameters, removeParameter, setParameter, setParameter, setParameters, validate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FreeBusy()
| Method Detail |
|---|
public void addValue(Date start,
Date end)
start - the start dateend - the end date
public void addValue(Date start,
Duration duration)
start - the start dateduration - the durationpublic List<Period> getValues()
public FreeBusyType getType()
public void setType(FreeBusyType fbType)
fbType - the type or null to remove
protected void validate(List<ICalComponent> components,
List<String> warnings)
ICalProperty
validate in class ICalPropertycomponents - the hierarchy of components that the property belongs
towarnings - the list to add the warnings to
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||