maybeCreate

abstract fun maybeCreate(name: String): T(source)

Looks for an item with the given name, creating and adding it to this container if it does not exist.

This operation is eager, the element is realized before being returned.

Return

The found or created object. Never null.

Parameters

name

The name to find or assign to the created object