public class NumericTemporalFormat extends Object implements TemporalFormat
| Constructor and Description |
|---|
NumericTemporalFormat(FastThreadLocal<NumberFormat> numberFormat,
ZoneId timeZone,
TimeUnit timeUnit,
ZonedDateTime epoch) |
| Modifier and Type | Method and Description |
|---|---|
String |
format(TemporalAccessor temporal)
Formats the given temporal.
|
TemporalAccessor |
numberToTemporal(Number n) |
TemporalAccessor |
parse(String text)
Parses the given string as a temporal.
|
Number |
temporalToNumber(TemporalAccessor temporal) |
public NumericTemporalFormat(FastThreadLocal<NumberFormat> numberFormat, ZoneId timeZone, TimeUnit timeUnit, ZonedDateTime epoch)
public TemporalAccessor parse(String text) throws DateTimeException
TemporalFormatparse in interface TemporalFormattext - the string to parse, may be null.TemporalAccessor or null if the string was null or empty.DateTimeException - if the string cannot be parsed.public String format(TemporalAccessor temporal) throws DateTimeException
TemporalFormatformat in interface TemporalFormattemporal - the value to format.null if the value was null.DateTimeException - if the value cannot be formatted.public TemporalAccessor numberToTemporal(Number n)
public Number temporalToNumber(TemporalAccessor temporal) throws DateTimeException
DateTimeExceptionCopyright © 2017–2021 DataStax. All rights reserved.