docs.gradle.org

Methods  Modifier and Type Method and Description void afterEach(Action<? super T> configAction)

Applies the given action to each item in the collection, as each item is required.

<S> void afterEach(Class<S> type, Action<? super S> configAction)

Applies the given action to each item of the given type in the collection, as each item is required.

void all(Action<? super T> configAction)

Applies the given action to each item in the collection, as each item is required.

void beforeEach(Action<? super T> configAction)

Applies the given action to each item in this collection, as each item is required.

<S> void beforeEach(Class<S> type, Action<? super S> configAction)

Applies the given action to each item of the given type in this collection, as each item is required.

boolean containsKey(Object name)

Returns true if this collection contains an item with the given name.

boolean containsValue(Object item)

Returns true if this collection contains the given item.

void create(String name)

Defines an item with the given name and type T.

void create(String name, Action<? super T> configAction)

Defines an item with the given name and type T.

<S extends T
void
create(String name, Class<S> type)

Defines an item with the given name and type.

<S extends T
void
create(String name, Class<S> type, Action<? super S> configAction)

Defines an item with the given name and type.

T get(Object name)

Returns the item with the given name, if any.

T get(String name)

Returns the item with the given name, if any.

boolean isEmpty()

Returns true if this collection contains no items.

Set<String> keySet()

Returns the names of the items in this collection.

void named(String name, Action<? super T> configAction)

Applies the given action to the given item, when the item is required.

void named(String name, Class<? extends RuleSource> ruleSource)

Applies the given rule source class to the given item, when the item is required.

void put(String name, T instance)

Adds an element to this ModelMap.

int size()

Returns the number of items in this collection.

Collection<T> values()

Returns the items in this collection.

<S> ModelMap<S> withType(Class<S> type)

Returns a collection containing the items from this collection which are of the specified type.

<S> void withType(Class<S> type, Action<? super S> configAction)

Applies the given action to each item of the given type in the collection, as each item is required.

<S> void withType(Class<S> type, Class<? extends RuleSource> rules)

Applies the given rules to all items of the collection of the given type.

Read the original on docs.gradle.org ↗