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.ObjectPredefined instances ofLDValue.Converterfor commonly used types.These are mostly useful for methods that convert
LDValueto 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>BooleanALDValue.Converterfor booleans.static LDValue.Converter<java.lang.Double>DoubleALDValue.Converterfor doubles.static LDValue.Converter<java.lang.Float>FloatALDValue.Converterfor floats.static LDValue.Converter<java.lang.Integer>IntegerALDValue.Converterfor integers.static LDValue.Converter<java.lang.Long>LongALDValue.Converterfor long integers.static LDValue.Converter<java.lang.String>StringALDValue.Converterfor strings.
-
-
-
Field Detail
-
Boolean
public static final LDValue.Converter<java.lang.Boolean> Boolean
ALDValue.Converterfor booleans.
-
Integer
public static final LDValue.Converter<java.lang.Integer> Integer
ALDValue.Converterfor integers.
-
Long
public static final LDValue.Converter<java.lang.Long> 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
public static final LDValue.Converter<java.lang.Float> Float
ALDValue.Converterfor floats.
-
Double
public static final LDValue.Converter<java.lang.Double> Double
ALDValue.Converterfor doubles.
-
String
public static final LDValue.Converter<java.lang.String> String
ALDValue.Converterfor strings.
-
-