public abstract static class LDValue.Convert
extends java.lang.Object
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)
.
Modifier and Type | Field and Description |
---|---|
static LDValue.Converter<java.lang.Boolean> |
Boolean
A
LDValue.Converter for booleans. |
static LDValue.Converter<java.lang.Double> |
Double
A
LDValue.Converter for doubles. |
static LDValue.Converter<java.lang.Float> |
Float
A
LDValue.Converter for floats. |
static LDValue.Converter<java.lang.Integer> |
Integer
A
LDValue.Converter for integers. |
static LDValue.Converter<java.lang.Long> |
Long
A
LDValue.Converter for long integers. |
static LDValue.Converter<java.lang.String> |
String
A
LDValue.Converter for strings. |
public static final LDValue.Converter<java.lang.Boolean> Boolean
LDValue.Converter
for booleans.public static final LDValue.Converter<java.lang.Integer> Integer
LDValue.Converter
for integers.public static final LDValue.Converter<java.lang.Long> Long
LDValue.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 of long
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 a
double
, it is best to encode it as a string.
public static final LDValue.Converter<java.lang.Float> Float
LDValue.Converter
for floats.public static final LDValue.Converter<java.lang.Double> Double
LDValue.Converter
for doubles.public static final LDValue.Converter<java.lang.String> String
LDValue.Converter
for strings.