type

DefinitionMap

src @Js
class DefinitionMap : Obj

A map that can be used to store and lookup reference definitions by a label. The labels are case-insensitive and normalized, the same way as for LinkReferenceDefinition nodes.

constructors

fields

of

The type of definition stored in this map

methods

addAll
get
putIfAbsent

Store a new definition unless one is already in the map.

Slot Details

addAll

src Void addAll(DefinitionMap that)

get

src @Operator
Block? get(Str label, Block? def := null)

make

src new make(Type of)

of

src const Type of

The type of definition stored in this map

putIfAbsent

src Block? putIfAbsent(Str label, Block def)

Store a new definition unless one is already in the map. If there is no definition for the label yet, return null. Otherwise return the existing definition

The label is normalized by the definition map before storing.