public class XMLDurationValue extends TermporalAmountValue<Duration>
PATTERN_BASIC_ISO_DATE, PATTERN_CURRENCY, PATTERN_FULL, PATTERN_INTEGER, PATTERN_ISO_DATE, PATTERN_ISO_DATE_TIME, PATTERN_ISO_INSTANT, PATTERN_ISO_LOCAL_DATE, PATTERN_ISO_LOCAL_DATE_TIME, PATTERN_ISO_LOCAL_TIME, PATTERN_ISO_OFFSET_DATE, PATTERN_ISO_OFFSET_DATE_TIME, PATTERN_ISO_OFFSET_TIME, PATTERN_ISO_ORDINAL_DATE, PATTERN_ISO_TIME, PATTERN_ISO_WEEK_DATE, PATTERN_ISO_ZONED_DATE_TIME, PATTERN_LONG, PATTERN_MEDIUM, PATTERN_PERCENT, PATTERN_RFC_1123_DATE_TIME, PATTERN_SHORT, RESOLVER_LENIENT, RESOLVER_LENIENT_NO_BRACKETS, RESOLVER_SMART, RESOLVER_SMART_NO_BRACKETS, RESOLVER_STRICT, RESOLVER_STRICT_NO_BRACKETS
Constructor and Description |
---|
XMLDurationValue() |
Modifier and Type | Method and Description |
---|---|
long |
asLong(Duration value,
LocaleInfo localeInfo)
Returns a long value if possible.
|
Duration |
convert(Object value,
Value.Type oldType,
LocaleInfo localeInfo)
Converts a value from another type.
|
Duration |
createDefault()
Creates the default value object for the data type.
|
String |
getDescription()
Gets the description of the type, used for the Designer.
|
Class<Duration> |
getValueClass()
Gets the class of the value.
|
Value.Type |
getValueType()
Gets the value type.
|
Duration |
parse(String value)
Creates a Value object from a String using a specified pattern and locale.
|
getFormatter, load, parse, save, toString, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
asLongCast, isRightAligned, saveCast, toStringCast, toStringForced
public final Value.Type getValueType()
public String getDescription()
public Duration createDefault()
public Duration parse(String value) throws ParseException, IllegalAccessException, Exception
value
- The value, never null.ParseException
- If the value could not be parsed.IllegalArgumentException
- For pattern errors.Exception
- For other errors.IllegalAccessException
public Duration convert(Object value, Value.Type oldType, LocaleInfo localeInfo) throws Exception
value
- The value to convert.oldType
- The old type, null for not defined.localeInfo
- The locale information, null to look-up from current thread or
if not found, for system default.Exception
- For other errors.public long asLong(Duration value, LocaleInfo localeInfo)
value
- The Value object.localeInfo
- The locale information, null to look-up from current thread or
if not found, for system default.iizi® is a registered trademark of Mindus SARL. © Copyright Mindus SARL, 2020. All rights reserved.