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
FieldsModifier and TypeFieldDescriptionstatic final LDValue.Converter<Boolean>ALDValue.Converterfor booleans.static final LDValue.Converter<Double>ALDValue.Converterfor doubles.static final LDValue.Converter<Float>ALDValue.Converterfor floats.static final LDValue.Converter<Integer>ALDValue.Converterfor integers.static final LDValue.Converter<Long>ALDValue.Converterfor long integers.static final LDValue.Converter<String>ALDValue.Converterfor strings. -
Method Summary
-
Field Details
-
Boolean
ALDValue.Converterfor booleans. -
Integer
ALDValue.Converterfor integers. -
Long
ALDValue.Converterfor 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 oflongvalues 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.Converterfor floats. -
Double
ALDValue.Converterfor doubles. -
String
ALDValue.Converterfor strings.
-