public class DateTimeConstant extends StringConstant
Constructor and Description |
---|
DateTimeConstant(String value)
Creates a new DateTimeConstant instance.
|
Modifier and Type | Method and Description |
---|---|
static String |
assertDateTime(String value)
Report a failure if the given value is not a valid date-time.
|
protected DataValue<String> |
dataValueOf(String value)
Returns a
DataValue for the given value in this domain. |
String |
getFormat()
Returns the format for values that belong to this domain.
|
static boolean |
isDateTime(String value)
Returns true if the given value is a valid date-time string.
|
void |
setFormat(String format)
Changes the format for values that belong to this domain.
|
static Date |
toTime(String value)
Returns the time represented by the given value;
|
contains, getTypes, getValue, toString, values
withFormat
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
arrayOf, arrayOf, arrayOf, contains, containsObject, getType, select, selectValue
public DateTimeConstant(String value)
public void setFormat(String format)
setFormat
in class AbstractValueDomain<String>
public String getFormat()
getFormat
in interface ValueDomain<String>
getFormat
in class AbstractValueDomain<String>
protected DataValue<String> dataValueOf(String value)
DataValue
for the given value in this domain.dataValueOf
in class StringConstant
public static boolean isDateTime(String value)
Copyright © 2024 The Cornutum Project. All rights reserved.