# withType

abstract fun <S : T?> withType(type: Class<S>): NamedDomainObjectCollection<S>(source)

Returns a collection containing the objects in this collection of the given type. The returned collection is live, so that when matching objects are later added to this collection, they are also visible in the filtered collection.

This method is an intermediate operation. It does not change the realized/unrealized state of the elements in the collection.