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.FactoryACKNOWLEDGED, 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 and Description |
|---|
DateProperty(String name,
ParameterList parameters,
PropertyFactory factory) |
DateProperty(String name,
PropertyFactory factory) |
| Modifier and Type | Method and 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 |
setValue(String value)
Default setValue() implementation.
|
void |
validate()
Perform validation on a property.
|
copy, equals, getName, getParameter, getParameters, getParameters, toStringpublic DateProperty(String name, ParameterList parameters, PropertyFactory factory)
name - the property nameparameters - a list of initial parameterspublic DateProperty(String name, PropertyFactory factory)
name - the property namepublic 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 Propertyvalue - a string representation of a DATE or DATE-TIME valueParseException - where the specified value is not a valid DATE or DATE-TIME
representationDateTimeParseExceptionpublic String getValue()
public final boolean isUtc()
public void validate()
throws ValidationException
validate in class PropertyValidationException - where the property is not in a valid state