public class When extends Element
Modifier and Type | Field and Description |
---|---|
static AttributeKey<DateTime> |
END_TIME
Event end time.
|
static ElementKey<java.lang.Void,When> |
KEY
The key for this element.
|
static AttributeKey<DateTime> |
START_TIME
Event start time.
|
static AttributeKey<java.lang.String> |
VALUE_STRING
String description of the event times.
|
Modifier | Constructor and Description |
---|---|
|
When()
Constructs an instance using the default key.
|
protected |
When(ElementKey<?,? extends When> key)
Subclass constructor, allows subclasses to supply their own element key.
|
protected |
When(ElementKey<?,? extends When> key,
Element source)
Constructs a new instance by doing a shallow copy of data from an existing
Element instance. |
Modifier and Type | Method and Description |
---|---|
When |
addReminder(Reminder reminder)
Adds a new event reminder.
|
void |
clearReminder()
Removes all existing event reminder instances.
|
DateTime |
getEndTime()
Returns the event end time.
|
java.util.List<Reminder> |
getReminder()
Returns the event reminders.
|
DateTime |
getStartTime()
Returns the event start time.
|
java.lang.String |
getValueString()
Returns the string description of the event times.
|
boolean |
hasEndTime()
Returns whether it has the event end time.
|
boolean |
hasReminder()
Returns whether it has the event reminders.
|
boolean |
hasStartTime()
Returns whether it has the event start time.
|
boolean |
hasValueString()
Returns whether it has the string description of the event times.
|
When |
lock()
Locks this element.
|
static void |
registerMetadata(MetadataRegistry registry)
Registers the metadata for this element.
|
boolean |
removeReminder(Reminder reminder)
Removes an existing event reminder.
|
When |
setEndTime(DateTime endTime)
Sets the event end time.
|
When |
setStartTime(DateTime startTime)
Sets the event start time.
|
When |
setValueString(java.lang.String valueString)
Sets the string description of the event times.
|
adapt, adapt, addElement, addElement, addElement, clear, createElement, createElement, eq, equals, getAttributeCount, getAttributeIterator, getAttributeIterator, getAttributeValue, getAttributeValue, getDefaultKey, getElement, getElement, getElementCount, getElementId, getElementIterator, getElementIterator, getElementKey, getElements, getElements, getElementSet, getElementSet, getElementValue, getElementValue, getTextValue, getTextValue, hasAttribute, hasAttribute, hasElement, hasElement, hashCode, hasTextValue, isLocked, narrow, removeAttribute, removeAttribute, removeAttributeValue, removeAttributeValue, removeElement, removeElement, removeElement, removeElement, replaceElement, resolve, resolve, sameClassAs, setAttributeValue, setAttributeValue, setElement, setElement, setElement, setTextValue, toString, validate, visit
public static final ElementKey<java.lang.Void,When> KEY
public static final AttributeKey<DateTime> END_TIME
public static final AttributeKey<DateTime> START_TIME
public static final AttributeKey<java.lang.String> VALUE_STRING
public When()
protected When(ElementKey<?,? extends When> key)
protected When(ElementKey<?,? extends When> key, Element source)
Element
instance. Will use the given ElementKey
as the key
for the element. This constructor is used when adapting from one element
key to another. You cannot call this constructor directly, instead use
Element.createElement(ElementKey, Element)
.key
- The key to use for this element.source
- source elementpublic static void registerMetadata(MetadataRegistry registry)
public When lock()
Element
public DateTime getEndTime()
public When setEndTime(DateTime endTime)
endTime
- event end time or null
to resetpublic boolean hasEndTime()
public java.util.List<Reminder> getReminder()
public When addReminder(Reminder reminder)
reminder
- event reminderpublic boolean removeReminder(Reminder reminder)
reminder
- event reminderpublic void clearReminder()
public boolean hasReminder()
public DateTime getStartTime()
public When setStartTime(DateTime startTime)
startTime
- event start time or null
to resetpublic boolean hasStartTime()
public java.lang.String getValueString()
public When setValueString(java.lang.String valueString)
valueString
- string description of the event times or null
to
resetpublic boolean hasValueString()