public class DurationProperty extends ValuedProperty<Duration>
Defines a duration of time (for example, "2 hours and 30 minutes"). This property has different meanings depending on the component it belongs to:
VEvent
- The duration of the event (used in place of a
DateEnd
property).VTodo
- The duration of the to-do task (used in place of a
DateEnd
property).VAlarm
- The pause between alarm repetitions.Code sample:
VEvent event = new VEvent(); Duration duration = Duration.builder().hours(2).minutes(30).build(); DurationProperty prop = new DurationProperty(duration); event.setDuration(prop);
value
parameters
Constructor and Description |
---|
DurationProperty(Duration duration)
Creates a duration property.
|
getValue, getValue, setValue, validate
addParameter, getParameter, getParameters, getParameters, removeParameter, setParameter, setParameter, setParameters, validate
public DurationProperty(Duration duration)
duration
- the duration value (e.g. "2 hours nad 30 minutes")Copyright © 2013-2015 Michael Angstadt. All Rights Reserved.