NamedDomainObjectSet - Gradle DSL Version 2.14.1

# NamedDomainObjectSet

API Documentation: | `NamedDomainObjectSet`

Known Subtypes:

`NamedDomainObjectContainer`
`ReportContainer`

A specialisation of `NamedDomainObjectCollection` that also implements `Set` and orders objects by their inherent name.

All object equality is determined in terms of object names. That is, calling `remove()` with an object that is NOT equal to an existing object in terms of `equals`, but IS in terms of name equality will result in the existing collection item with the equal name being removed.

### Properties

No properties

### Methods

Method | Description
`getAt(name)` | Locates an object by name, failing if there is no such task. This method is identical to `NamedDomainObjectCollection.getByName(java.lang.String)`. You can call this method in your build script by using the groovy `[]` operator.
`getByName(name)` | Locates an object by name, failing if there is no such object.
`getByName(name, configureClosure)` | Locates an object by name, failing if there is no such object. The given configure closure is executed against the object before it is returned from this method. The object is passed to the closure as its delegate.

### Script blocks

No script blocks

### Method details

#### `T` `getAt`(`String` name)

Locates an object by name, failing if there is no such task. This method is identical to `NamedDomainObjectCollection.getByName(java.lang.String)`. You can call this method in your build script by using the groovy `[]` operator.

#### `T` `getByName`(`String` name)

Locates an object by name, failing if there is no such object.

#### `T` `getByName`(`String` name, `Closure` configureClosure)

Locates an object by name, failing if there is no such object. The given configure closure is executed against the object before it is returned from this method. The object is passed to the closure as its delegate.