Value(androidJvm)

Wrapper class for value, complies to the mapbox type system.

open class Value(androidJvm)

Constructors

Value
Link copied to clipboard

Create a value from a double.

open fun Value(d: Double)
Value
Link copied to clipboard

Create a value from a long.

open fun Value(l: Long)
Value
Link copied to clipboard

Create a value from a boolean.

open fun Value(b: Boolean)
Value
Link copied to clipboard

Create a value from a string.

open fun Value(str: String)
Value
Link copied to clipboard

Create a value from an list.

open fun Value(array: List<Value>)
Value
Link copied to clipboard

Create a value from a map.

open fun Value(map: HashMap<String, Value>)

Functions

equals
Link copied to clipboard
open fun equals(other: Any): Boolean
fromJson
Link copied to clipboard

Converts JSON string to a value.

open fun fromJson(json: String): Expected<String, Value>
hashCode
Link copied to clipboard
open fun hashCode(): Int
nullValue
Link copied to clipboard

Create a null value

open fun nullValue(): Value
toJson
Link copied to clipboard

Converts value to a JSON string. The method is intended to be used when `machine-readable` string is needed.

open fun toJson(): String
toString
Link copied to clipboard
open fun toString(): String
valueOf
Link copied to clipboard

Create a value from a boolean.

open fun valueOf(b: Boolean): Value

Create a value from a double.

open fun valueOf(d: Double): Value

Create a value from a string.

open fun valueOf(str: String): Value

Create a value from a map

open fun valueOf(map: HashMap<String, Value>): Value

Create a value from an list

open fun valueOf(array: List<Value>): Value

Create a value from a long.

open fun valueOf(l: Long): Value

Properties

contents
Link copied to clipboard
private open val contents: Any

Inheritors

Expression
Link copied to clipboard

Extensions

unwrapToAny
Link copied to clipboard

Extension function for Value to unwrap Value to Any.

fun Value.unwrapToAny(): Any
unwrapToExpression
Link copied to clipboard

Extension function for Value to unwrap Value to Expression.

Throws exception if couldn't convert.

fun Value.unwrapToExpression(): Expression
unwrapToStyleTransition
Link copied to clipboard

Extension function for Value to unwrap Value to StyleTransition.

Throws exception if couldn't convert.

fun Value.unwrapToStyleTransition(): StyleTransition
unwrapToTyped
Link copied to clipboard

Extension function for Value to unwrap Value to the given type.

Throws exception if type doesn't match.

inline fun <T> Value.unwrapToTyped(): T