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 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
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. -
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 user 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.
-