gradle
8.6

# containerWithType

abstract fun <U : T?> containerWithType(type: Class<U>): NamedDomainObjectContainer<U>(source)

Creates a regular container that wraps the polymorphic container presenting all elements of a specified type.

#### Return

a NamedDomainObjectContainer providing access to elements of type U.

#### Parameters

type

the type of the container elements

<U>

the type of the container elements