public class FreeBusy extends ListProperty<Period>
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").
Code sample:
VFreeBusy fb = new VFreeBusy(); FreeBusy freebusy = new FreeBusy(); freebusy.setType(FreeBusyType.BUSY); Date onePM = ... Date threePM = ... freebusy.getValues().add(new Period(onePM, threePM)); fb.addFreeBusy(freebusy);
valuesparameters| Constructor and Description |
|---|
FreeBusy() |
FreeBusy(FreeBusy original)
Copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
FreeBusy |
copy()
Creates a copy of this property object.
|
FreeBusyType |
getType()
Gets the person's status over the time periods that are specified in this
property (for example, "free" or "busy").
|
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,
ICalVersion version,
List<ValidationWarning> warnings)
Checks the property for data consistency problems or deviations from the
specifications.
|
equals, getValues, hashCode, toStringValuesaddParameter, getParameter, getParameters, getParameters, removeParameter, setParameter, setParameter, setParameters, toString, validatepublic FreeBusy()
public FreeBusyType getType()
public void setType(FreeBusyType fbType)
fbType - the type or null to removeprotected void validate(List<ICalComponent> components, ICalVersion version, List<ValidationWarning> warnings)
ICalPropertyChecks the property for data consistency problems or deviations from the specifications.
This method should be overridden by child classes that wish to provide validation logic. The default implementation of this method does nothing.
validate in class ListProperty<Period>components - the hierarchy of components that the property belongs
toversion - the version to validate againstwarnings - the list to add the warnings topublic FreeBusy copy()
ICalPropertyCreates a copy of this property object.
The default implementation of this method uses reflection to look for a copy constructor. Child classes SHOULD override this method to avoid the performance overhead involved in using reflection.
The child class's copy constructor, if present, MUST invoke the
ICalProperty.ICalProperty(ICalProperty) super constructor to ensure that the
parameters are also copied.
This method MUST be overridden by the child class if the child class does
not have a copy constructor. Otherwise, an
UnsupportedOperationException will be thrown when an attempt is
made to copy the property (such as in the
ICalendar class's copy constructor
).
copy in class ICalPropertyCopyright © 2013–2024 Michael Angstadt. All rights reserved.