Serializable
Acknowledged
, Completed
, Created
, DtEnd
, DtStamp
, DtStart
, Due
, LastModified
, RecurrenceId
, Trigger
public abstract class DateProperty<T extends Temporal> extends Property
Temporal
type for the property.
For example:
Instant
to represent UTC timeLocalDate
to represent a date valueZonedDateTime
to represent a date-time value influenced by timezone rulesContent.Factory
ACKNOWLEDGED, ACTION, ATTACH, ATTENDEE, BUSYTYPE, CALSCALE, CATEGORIES, CLASS, COMMENT, COMPLETED, CONTACT, COUNTRY, CREATED, DESCRIPTION, DTEND, DTSTAMP, DTSTART, DUE, DURATION, EXDATE, EXPERIMENTAL_PREFIX, EXRULE, EXTENDED_ADDRESS, FREEBUSY, GEO, LAST_MODIFIED, LOCALITY, LOCATION, LOCATION_TYPE, METHOD, NAME, ORGANIZER, PERCENT_COMPLETE, POSTALCODE, PRIORITY, PRODID, RDATE, RECURRENCE_ID, REGION, RELATED_TO, REPEAT, REQUEST_STATUS, RESOURCES, RRULE, SEQUENCE, STATUS, STREET_ADDRESS, SUMMARY, TEL, TRANSP, TRIGGER, TZID, TZNAME, TZOFFSETFROM, TZOFFSETTO, TZURL, UID, URL, VERSION
Constructor | Description |
---|---|
DateProperty(String name) |
|
DateProperty(String name,
CalendarDateFormat parseFormat) |
|
DateProperty(String name,
ParameterList parameters) |
|
DateProperty(String name,
ParameterList parameters,
CalendarDateFormat parseFormat) |
Modifier and Type | Method | Description |
---|---|---|
T |
getDate() |
This method will attempt to dynamically cast the internal
Temporal value to the
required return value. |
String |
getValue() |
|
int |
hashCode() |
|
boolean |
isUtc() |
Indicates whether the current date value is specified in UTC time.
|
void |
setDate(T date) |
Sets the date value of this property.
|
void |
setTimeZoneRegistry(TimeZoneRegistry timeZoneRegistry) |
|
void |
setValue(String value) |
Default setValue() implementation.
|
void |
validate() |
Perform validation on a property.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
add, copy, equals, getName, getParameter, getParameters, getParameters, newFactory, remove, removeAll, replace, setParameters, toString
public DateProperty(String name, ParameterList parameters)
name
- the property nameparameters
- a list of initial parameterspublic DateProperty(String name, ParameterList parameters, CalendarDateFormat parseFormat)
public DateProperty(String name)
name
- the property namepublic DateProperty(String name, CalendarDateFormat parseFormat)
public T getDate()
Temporal
value to the
required return value.
e.g. LocalDate localDate = dateProperty.getDate();public void setDate(T date)
date
- The date to set.public void setValue(String value) throws DateTimeParseException
TemporalAdapter.parse(String, ZoneId)
and
setDate(Temporal)
.setValue
in class Property
value
- a string representation of a DATE or DATE-TIME valueDateTimeParseException
public String getValue()
public void setTimeZoneRegistry(TimeZoneRegistry timeZoneRegistry)
public final boolean isUtc()
public void validate() throws ValidationException
validate
in class Property
ValidationException
- where the property is not in a valid state