type

SpecSlots

@Js
const mixin SpecSlots

SpecSlots is a map of named Specs

NOTE: in most cases name keys match the Spec.name of slot specs themselves. However, in cases where the slot name is an auto-name of "_0", "_1", etc its possible that the slot name keys do not match their slot names. This occurs when inheriting auto-named slots. The spec names are assigned uniquely per type, but when merged by inheritance might be assigned new unique names. This often occurs in queries such as point queries.

methods

each

Iterate through the children using key.

eachWhile

Iterate through the children until function returns non-null NOTE: the name parameter may not match slots names

get

Get the child slot spec as keyed by this slots map NOTE: the name key may not match slot name

has

Return if the given slot name is defined.

isEmpty

Return if slots are empty

missing

Return if the given slot name is undefined.

names

Convenience to list the slots names; prefer each.

Slot Details

each

abstract Void each(|Spec,Str| f)

Iterate through the children using key. NOTE: the name parameter may not match slots names

eachWhile

abstract Obj? eachWhile(|Spec,Str->Obj?| f)

Iterate through the children until function returns non-null NOTE: the name parameter may not match slots names

get

abstract Spec? get(Str name, Bool checked := true)

Get the child slot spec as keyed by this slots map NOTE: the name key may not match slot name

has

abstract Bool has(Str name)

Return if the given slot name is defined. NOTE: the name key may not match slot name

isEmpty

abstract Bool isEmpty()

Return if slots are empty

missing

abstract Bool missing(Str name)

Return if the given slot name is undefined. NOTE: the name key may not match slot name

names

abstract Str[] names()

Convenience to list the slots names; prefer each. NOTE: the names may not match slots names