public class JSR310Utils extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
static ValueInterval |
durationToValue(Duration duration)
Converts a Duration to a Value.
|
static ValueTimestampTimeZone |
instantToValue(Instant instant)
Converts a Instant to a Value.
|
static ValueTimestamp |
localDateTimeToValue(LocalDateTime localDateTime)
Converts a LocalDateTime to a Value.
|
static ValueDate |
localDateToValue(LocalDate localDate)
Converts a LocalDate to a Value.
|
static ValueTime |
localTimeToValue(LocalTime localTime)
Converts a LocalTime to a Value.
|
static ValueTimestampTimeZone |
offsetDateTimeToValue(OffsetDateTime offsetDateTime)
Converts a OffsetDateTime to a Value.
|
static ValueTimeTimeZone |
offsetTimeToValue(OffsetTime offsetTime)
Converts a OffsetTime to a Value.
|
static ValueInterval |
periodToValue(Period period)
Converts a Period to a Value.
|
static Duration |
valueToDuration(Value value)
Converts a value to a Duration.
|
static Instant |
valueToInstant(Value value,
CastDataProvider provider)
Converts a value to a Instant.
|
static LocalDate |
valueToLocalDate(Value value,
CastDataProvider provider)
Converts a value to a LocalDate.
|
static LocalDateTime |
valueToLocalDateTime(Value value,
CastDataProvider provider)
Converts a value to a LocalDateTime.
|
static LocalTime |
valueToLocalTime(Value value,
CastDataProvider provider)
Converts a value to a LocalTime.
|
static OffsetDateTime |
valueToOffsetDateTime(Value value,
CastDataProvider provider)
Converts a value to a OffsetDateTime.
|
static OffsetTime |
valueToOffsetTime(Value value,
CastDataProvider provider)
Converts a value to a OffsetTime.
|
static Period |
valueToPeriod(Value value)
Converts a value to a Period.
|
static ZonedDateTime |
valueToZonedDateTime(Value value,
CastDataProvider provider)
Converts a value to a ZonedDateTime.
|
static ValueTimestampTimeZone |
zonedDateTimeToValue(ZonedDateTime zonedDateTime)
Converts a ZonedDateTime to a Value.
|
public static LocalDate valueToLocalDate(Value value, CastDataProvider provider)
value - the value to convertprovider - the cast information providerpublic static LocalTime valueToLocalTime(Value value, CastDataProvider provider)
value - the value to convertprovider - the cast information providerpublic static LocalDateTime valueToLocalDateTime(Value value, CastDataProvider provider)
value - the value to convertprovider - the cast information providerpublic static Instant valueToInstant(Value value, CastDataProvider provider)
value - the value to convertprovider - the cast information providerpublic static OffsetDateTime valueToOffsetDateTime(Value value, CastDataProvider provider)
value - the value to convertprovider - the cast information providerpublic static ZonedDateTime valueToZonedDateTime(Value value, CastDataProvider provider)
value - the value to convertprovider - the cast information providerpublic static OffsetTime valueToOffsetTime(Value value, CastDataProvider provider)
value - the value to convertprovider - the cast information providerpublic static Period valueToPeriod(Value value)
value - the value to convertpublic static Duration valueToDuration(Value value)
value - the value to convertpublic static ValueDate localDateToValue(LocalDate localDate)
localDate - the LocalDate to convert, not nullpublic static ValueTime localTimeToValue(LocalTime localTime)
localTime - the LocalTime to convert, not nullpublic static ValueTimestamp localDateTimeToValue(LocalDateTime localDateTime)
localDateTime - the LocalDateTime to convert, not nullpublic static ValueTimestampTimeZone instantToValue(Instant instant)
instant - the Instant to convert, not nullpublic static ValueTimestampTimeZone offsetDateTimeToValue(OffsetDateTime offsetDateTime)
offsetDateTime - the OffsetDateTime to convert, not nullpublic static ValueTimestampTimeZone zonedDateTimeToValue(ZonedDateTime zonedDateTime)
zonedDateTime - the ZonedDateTime to convert, not nullpublic static ValueTimeTimeZone offsetTimeToValue(OffsetTime offsetTime)
offsetTime - the OffsetTime to convert, not nullpublic static ValueInterval periodToValue(Period period)
period - the Period to convert, not nullpublic static ValueInterval durationToValue(Duration duration)
duration - the Duration to convert, not nullCopyright © 2022. All rights reserved.