Class: List

olympe.df. List

A List is an ordered map of key-value pairs. Each value can be retrieved either by its key or its rank.


new List( [valueType])

Creates a new List for a specific type of values.

Parameters:
Name Type Argument Description
valueType function <optional>

Item's value type constructor

Extends

Methods


clear()

Removes all values from the map


remove(key)

Removes an entry from the list.

Parameters:
Name Type Description
key string

Key of the entry to be removed.

Returns:

The value of the removed entry.

Type
T | undefined

set(key, value [, rank])

Adds an entry to the list.

Parameters:
Name Type Argument Description
key string

Key of the entry

value T

entry's value

rank olympe.df.PONumber | number <optional>

the rank of this entry


setRank(key, rank)

Sets the rank of an entry in the list.

Parameters:
Name Type Description
key string

Key of the entry

rank olympe.df.PONumber | number

the entry's rank