Class OptionalDoubleAttributeConverter

java.lang.Object
software.amazon.awssdk.enhanced.dynamodb.internal.converter.attribute.OptionalDoubleAttributeConverter
All Implemented Interfaces:
AttributeConverter<OptionalDouble>

@ThreadSafe @Immutable public final class OptionalDoubleAttributeConverter extends Object implements AttributeConverter<OptionalDouble>
A converter between OptionalDouble and AttributeValue.

This stores values in DynamoDB as a number.

This supports converting numbers stored in DynamoDB into a double-precision floating point number, within the range Double.MIN_VALUE, Double.MAX_VALUE. Null values are converted to OptionalDouble.empty(). For less precision or smaller values, consider using OptionalAttributeConverter along with a Float type. For greater precision or larger values, consider using OptionalAttributeConverter along with a BigDecimal type.

If values are known to be whole numbers, it is recommended to use a perfect-precision whole number representation like those provided by OptionalIntAttributeConverter, OptionalLongAttributeConverter, or a OptionalAttributeConverter along with a BigInteger type.

This can be created via create().