enumGetValue: Get enum values

View source: R/enum.R

enumGetValueR Documentation

Get enum values

Description

Return the value that is stored under the given key. If the key is not present, an error is thrown.

Usage

enumGetValue(enum, key)

Arguments

enum

The enum that contains the key-value pair.

key

The key under which the value is stored.

Value

Value that is assigned to key.

See Also

Other enumeration-helpers: enumGetKey(), enumHasKey(), enumKeys(), enumPut(), enumRemove(), enumValues(), enum()

Examples

Symbol <- enum(c(Diamond = 1, Triangle = 2, Circle = 2))
enumGetValue(Symbol, "Diamond")

ospsuite.utils documentation built on March 18, 2022, 6:44 p.m.