Home > @magiclane/maps-sdk > GemParameter

GemParameter class

Core A parameter is a tuple ( key, value, name ).

key is the string parameter identifier

value is the parameter variant value.

name is the string parameter name. When parameters are returned from SDK the name is translated in the SDK language

value is the parameter value. It is dependent on the type

Signature:

export declare class GemParameter extends GemAutoreleaseObject 

Extends: GemAutoreleaseObject

Constructors

Constructor

Modifiers

Description

(constructor)({ type, value, name, key, }, input)

Construct a parameter object.

Properties

Property

Modifiers

Type

Description

key?

string

(Optional)

name?

string

(Optional)

type?

ValueType

(Optional)

value?

any

(Optional)

Methods

Method

Modifiers

Description

asJson()

Returns the parameter as a JSON object.

equals(other)

fromJson(json)

static

hashCode()

toJson()

withBool({ key, value, name, }, input)

static

Creates a GemParameter with a ValueType.bool value type

withInt({ key, value, name, }, input)

static

Creates a GemParameter with a ValueType.int value type

withList({ key, value, name, }, input)

static

Creates a GemParameter with a ValueType.list value type

withReal({ key, value, name, }, input)

static

Creates a GemParameter with a ValueType.real value type

withString({ key, value, name, }, input)

static

Creates a GemParameter with a ValueType.string value type