Package com.launchdarkly.sdk
Class LDValue.Convert
- java.lang.Object
-
- com.launchdarkly.sdk.LDValue.Convert
-
- Enclosing class:
- LDValue
public abstract static class LDValue.Convert extends java.lang.Object
Predefined instances ofLDValue.Converter
for commonly used types.These are mostly useful for methods that convert
LDValue
to or from a collection of some type, such asLDValue.Converter.arrayOf(Object...)
andLDValue.valuesAs(Converter)
.
-
-
Field Summary
Fields Modifier and Type Field Description static LDValue.Converter<java.lang.Boolean>
Boolean
ALDValue.Converter
for booleans.static LDValue.Converter<java.lang.Double>
Double
ALDValue.Converter
for doubles.static LDValue.Converter<java.lang.Float>
Float
ALDValue.Converter
for floats.static LDValue.Converter<java.lang.Integer>
Integer
ALDValue.Converter
for integers.static LDValue.Converter<java.lang.Long>
Long
ALDValue.Converter
for long integers.static LDValue.Converter<java.lang.String>
String
ALDValue.Converter
for strings.
-
-
-
Field Detail
-
Boolean
public static final LDValue.Converter<java.lang.Boolean> Boolean
ALDValue.Converter
for booleans.
-
Integer
public static final LDValue.Converter<java.lang.Integer> Integer
ALDValue.Converter
for integers.
-
Long
public static final LDValue.Converter<java.lang.Long> 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
public static final LDValue.Converter<java.lang.Float> Float
ALDValue.Converter
for floats.
-
Double
public static final LDValue.Converter<java.lang.Double> Double
ALDValue.Converter
for doubles.
-
String
public static final LDValue.Converter<java.lang.String> String
ALDValue.Converter
for strings.
-
-