public class Action extends EnumProperty
Defines the type of action to invoke when an alarm is triggered.
Code sample (creating):
Action action = Action.audio();
Code sample (retrieving):
ICalendar ical = ...
for (VAlarm alarm : ical.getAlarms()){
Action action = alarm.getAction();
if (action.isAudio()) {
...
} else if (action.isEmail()){
...
} else if (action.isDisplay()){
...
}
}
valueparameters| Constructor and Description |
|---|
Action(Action original)
Copy constructor.
|
Action(String value)
Creates an action property.
|
| Modifier and Type | Method and Description |
|---|---|
static Action |
audio()
Creates an "audio" action property.
|
Action |
copy()
Creates a copy of this property object.
|
static Action |
display()
Creates an "display" action property.
|
static Action |
email()
Creates an "email" action property.
|
protected Collection<String> |
getStandardValues(ICalVersion version)
Gets the list of acceptable values for this property.
|
protected Collection<ICalVersion> |
getValueSupportedVersions()
Gets the iCalendar versions that this property's value is supported in.
|
boolean |
isAudio()
Determines if this property is an "audio" action.
|
boolean |
isDisplay()
Determines if this property is an "display" action.
|
boolean |
isEmail()
Determines if this property is an "email" action.
|
boolean |
isProcedure()
Determines if this property is a "procedure" action (vCal 1.0 only).
|
static Action |
procedure()
Creates a "procedure" action property (vCal 1.0 only).
|
equals, hashCode, is, validategetValue, getValue, setValue, toStringValues, valueEquals, valueHashCodeaddParameter, getParameter, getParameters, getParameters, removeParameter, setParameter, setParameter, setParameters, toString, validatepublic Action(String value)
value - the value (e.g. "AUDIO")public boolean isAudio()
public boolean isDisplay()
public boolean isEmail()
public static Action procedure()
public boolean isProcedure()
protected Collection<String> getStandardValues(ICalVersion version)
EnumPropertygetStandardValues in class EnumPropertyversion - the versionprotected Collection<ICalVersion> getValueSupportedVersions()
EnumPropertygetValueSupportedVersions in class EnumPropertypublic Action 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-2016 Michael Angstadt. All Rights Reserved.