public final class StringToInstant extends Object implements StringToValueConverter.StringToValue<Instant>
StringToValueConverter.StringToValue
that converts a string to an Instant
type.
Respects the TimestampFormatTrait
if present.Modifier and Type | Method and Description |
---|---|
Instant |
convert(String value,
SdkField<Instant> field)
Converts the value to a string.
|
static StringToInstant |
create(Map<MarshallLocation,TimestampFormatTrait.Format> defaultFormats) |
public Instant convert(String value, SdkField<Instant> field)
StringToValueConverter.StringToValue
convert
in interface StringToValueConverter.StringToValue<Instant>
value
- Value to convert from.field
- SdkField
containing metadata about the member being unmarshalled.public static StringToInstant create(Map<MarshallLocation,TimestampFormatTrait.Format> defaultFormats)
defaultFormats
- Default formats for each MarshallLocation
as defined by the protocol.StringToValueConverter.StringToValue
for Instant
types.Copyright © 2019. All rights reserved.