For AI agents: the documentation index is at https://docs.gradle.org/llms.txt. Request any page with the header Accept: text/markdown to get Markdown. User manual pages are also available as Markdown by replacing .html with .md in the URL.

add

abstract fun add(e: T): Boolean(source)

Adds an object to the collection, if there is no existing object in the collection with the same name.

Return

true if the item was added, or false if an item with the same name already exists.

Parameters

e

the item to add to the collection