VariableValue

sealed class VariableValue

The value assigned to a feature variation. This structure must contain exactly one field. It can be boolValue, doubleValue, longValue, or stringValue.

Inheritors

Types

Link copied to clipboard
data class BoolValue(val value: Boolean) : VariableValue

If this feature uses the Boolean variation type, this field contains the Boolean value of this variation.

Link copied to clipboard
data class DoubleValue(val value: Double) : VariableValue

If this feature uses the double integer variation type, this field contains the double integer value of this variation.

Link copied to clipboard
data class LongValue(val value: Long) : VariableValue

If this feature uses the long variation type, this field contains the long value of this variation.

Link copied to clipboard
Link copied to clipboard
data class StringValue(val value: String) : VariableValue

If this feature uses the string variation type, this field contains the string value of this variation.

Functions

Link copied to clipboard

Casts this VariableValue as a BoolValue and retrieves its kotlin.Boolean value. Throws an exception if the VariableValue is not a BoolValue.

Link copied to clipboard

Casts this VariableValue as a BoolValue and retrieves its kotlin.Boolean value. Returns null if the VariableValue is not a BoolValue.

Link copied to clipboard

Casts this VariableValue as a DoubleValue and retrieves its kotlin.Double value. Throws an exception if the VariableValue is not a DoubleValue.

Link copied to clipboard

Casts this VariableValue as a DoubleValue and retrieves its kotlin.Double value. Returns null if the VariableValue is not a DoubleValue.

Link copied to clipboard

Casts this VariableValue as a LongValue and retrieves its kotlin.Long value. Throws an exception if the VariableValue is not a LongValue.

Link copied to clipboard

Casts this VariableValue as a LongValue and retrieves its kotlin.Long value. Returns null if the VariableValue is not a LongValue.

Link copied to clipboard

Casts this VariableValue as a StringValue and retrieves its kotlin.String value. Throws an exception if the VariableValue is not a StringValue.

Link copied to clipboard

Casts this VariableValue as a StringValue and retrieves its kotlin.String value. Returns null if the VariableValue is not a StringValue.