ModelMap (Gradle API 2.10)
Date: 2015-12-21

Package: org.gradle.model

## [Java] Interface ModelMap<T>

- org.gradle.model.collection.CollectionBuilder

- All Superinterfaces:
    CollectionBuilder

  Model backed map like structure allowing adding of items where instantiation is managed.

  Managed types may declare model map properties. Model maps can only contain managed types.

  Parameters:
    `` - the contract type for all items

- - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `void` | `afterEach(Action<? super T> configAction)` {@inheritDoc}
    `void` | `afterEach(Class<S> type, Action<? super S> configAction)` {@inheritDoc}
    `void` | `all(Action<? super T> configAction)` {@inheritDoc}
    `void` | `beforeEach(Action<? super T> configAction)` {@inheritDoc}
    `void` | `beforeEach(Class<S> type, Action<? super S> configAction)` {@inheritDoc}
    `boolean` | `containsKey(Object name)` {@inheritDoc}
    `boolean` | `containsValue(Object item)` {@inheritDoc}
    `void` | `create(String name)` {@inheritDoc}
    `void` | `create(String name, Action<? super T> configAction)` {@inheritDoc}
    `void` | `create(String name, Class<S> type)` {@inheritDoc}
    `void` | `create(String name, Class<S> type, Action<? super S> configAction)` {@inheritDoc}
    `T` | `get(Object name)` {@inheritDoc}
    `T` | `get(String name)` {@inheritDoc}
    `boolean` | `isEmpty()` {@inheritDoc}
    `Set<String>` | `keySet()` {@inheritDoc}
    `void` | `named(String name, Action<? super T> configAction)` {@inheritDoc}
    `void` | `named(String name, Class<? extends RuleSource> ruleSource)` {@inheritDoc}
    `void` | `put(String name, T instance)` Add an unmanaged instance to the `ModelMap`.
    `int` | `size()` {@inheritDoc}
    `Collection<T>` | `values()` {@inheritDoc}
    `ModelMap<S>` | `withType(Class<S> type)` {@inheritDoc}
    `void` | `withType(Class<S> type, Action<? super S> configAction)` {@inheritDoc}
    `void` | `withType(Class<S> type, Class<? extends RuleSource> rules)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `interface CollectionBuilder` | `afterEach, afterEach, all, beforeEach, beforeEach, containsKey, containsValue, create, create, create, create, get, get, isEmpty, keySet, named, named, size, values, withType, withType, withType`
    `interface Iterable` | `iterator`
    `class Object` | `wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll`

- - ### Method Detail

    - #### @Override /** * {@inheritDoc} */ public void afterEach(Action<? super T> configAction)

      {@inheritDoc}

    - #### @Override /** * {@inheritDoc} */ public void afterEach(Class<S> type, Action<? super S> configAction)

      {@inheritDoc}

    - #### @Override public void all(Action<? super T> configAction)

      {@inheritDoc}

    - #### @Override public void beforeEach(Action<? super T> configAction)

      {@inheritDoc}

    - #### @Override public void beforeEach(Class<S> type, Action<? super S> configAction)

      {@inheritDoc}

    - #### @Override public boolean containsKey(Object name)

      {@inheritDoc}

    - #### @Override public boolean containsValue(Object item)

      {@inheritDoc}

    - #### @Override public void create(String name)

      {@inheritDoc}

    - #### @Override public void create(String name, Action<? super T> configAction)

      {@inheritDoc}

    - #### @Override public void create(String name, Class<S> type)

      {@inheritDoc}

    - #### @Override public void create(String name, Class<S> type, Action<? super S> configAction)

      {@inheritDoc}

    - #### @Nullable @Override public T get(Object name)

      {@inheritDoc}

    - #### @Nullable @Override public T get(String name)

      {@inheritDoc}

    - #### @Override public boolean isEmpty()

      {@inheritDoc}

    - #### @Override public Set<String> keySet()

      {@inheritDoc}

    - #### @Override public void named(String name, Action<? super T> configAction)

      {@inheritDoc}

    - #### @Override public void named(String name, Class<? extends RuleSource> ruleSource)

      {@inheritDoc}

    - #### public void put(String name, T instance)

      Add an unmanaged instance to the `ModelMap`.

    - #### @Override public int size()

      {@inheritDoc}

    - #### @Override public Collection<T> values()

      {@inheritDoc}

    - #### @Override public ModelMap<S> withType(Class<S> type)

      {@inheritDoc}

    - #### @Override public void withType(Class<S> type, Action<? super S> configAction)

      {@inheritDoc}

    - #### @Override /** * {@inheritDoc} */ public void withType(Class<S> type, Class<? extends RuleSource> rules)