EnumItems
@Js
const mixin EnumItems : ItemList
EnumItems is an ordered collection of EnumItem modeling an
enumeration. It is the single model for the enum tag in every
shape that tag is allowed to take. Construct via PiEnv.enum.
Empty enumeration
Formatter which displays a value using its item text
Return if this enumeration has no items
Lookup an item by its string key
Lookup the item for a data value
List the string keys in order
Items of this enumeration
Comma separated keys
abstract Format format()
Formatter which displays a value using its item text
abstract Bool isEmpty()
Return if this enumeration has no items
abstract EnumItem? item(Str key, Bool checked := true)
Lookup an item by its string key
abstract EnumItem? itemForData(Obj? data)
Lookup the item for a data value. A Str matches by key; a Bool selects by ordinal so a two item enum can range a Bool as "false,true". Returns null if there is no match.
abstract Str[] keys()
List the string keys in order
abstract EnumItem[] list()
Items of this enumeration
const static EnumItems : none
Empty enumeration
virtual Str toStr()
Comma separated keys