Package com.launchdarkly.sdk
Class LDValue.Convert
java.lang.Object
com.launchdarkly.sdk.LDValue.Convert
- Enclosing class:
- LDValue
Predefined instances of
LDValue.Converter
for commonly used types.
These are mostly useful for methods that convert LDValue
to or from a collection of
some type, such as LDValue.Converter.arrayOf(Object...)
and
LDValue.valuesAs(Converter)
.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final LDValue.Converter<Boolean>
ALDValue.Converter
for booleans.static final LDValue.Converter<Double>
ALDValue.Converter
for doubles.static final LDValue.Converter<Float>
ALDValue.Converter
for floats.static final LDValue.Converter<Integer>
ALDValue.Converter
for integers.static final LDValue.Converter<Long>
ALDValue.Converter
for long integers.static final LDValue.Converter<String>
ALDValue.Converter
for strings. -
Method Summary
-
Field Details
-
Boolean
ALDValue.Converter
for booleans. -
Integer
ALDValue.Converter
for integers. -
Long
ALDValue.Converter
for long integers.Note that the LaunchDarkly service, and most of the SDKs, represent numeric values internally in 64-bit floating-point, which has slightly less precision than a signed 64-bit
long
; therefore, the full range oflong
values cannot be accurately represented. If you need to set a context attribute to a numeric value with more significant digits than will fit in adouble
, it is best to encode it as a string. -
Float
ALDValue.Converter
for floats. -
Double
ALDValue.Converter
for doubles. -
String
ALDValue.Converter
for strings.
-