public class DateTimeDatatype extends AbstractDatatype<Calendar>
Datatype.Builtin, Datatype.Default| Modifier and Type | Field and Description |
|---|---|
protected String[] |
readFormats |
protected String |
writeFormat |
| Constructor and Description |
|---|
DateTimeDatatype(String[] readFormats,
String writeFormat) |
| Modifier and Type | Method and Description |
|---|---|
protected Date |
getDateValue(String value,
String[] formats) |
String |
getString(Calendar value)
Transforms a value supported by this datatype into a string representation.
|
protected TimeZone |
getTimeZone() |
protected String |
normalizeTimeZone(String value) |
Calendar |
valueOf(String s)
Transforms a string representation into a value of the supported type.
|
getBuiltin, getDisplayString, getValueType, isHandlingJavaType, isValid, setBuiltin, toStringpublic Calendar valueOf(String s) throws InvalidValueException
DatatypevalueOf in interface Datatype<Calendar>valueOf in class AbstractDatatype<Calendar>s - The string representation of a value.null if the string was null or empty.InvalidValueException - If the string couldn't be parsed.public String getString(Calendar value) throws InvalidValueException
Datatype
This method calls Datatype.isValid(Object) before converting the value, it throws
an exception if validation fails.
getString in interface Datatype<Calendar>getString in class AbstractDatatype<Calendar>value - The value to transform.null.InvalidValueExceptionprotected TimeZone getTimeZone()
Copyright © 2023 jUPnP.org. All rights reserved.