import "copyrightAndOthers.stg"

targetPath() ::= "org/eclipse/collections/api/factory/map/primitive"

fileName(primitive) ::= "MutableObject<primitive.name>MapFactory"

class(primitive) ::= <<
<body(primitive.type, primitive.name)>
>>

body(type, name) ::= <<
<copyrightAndOthers()>

package org.eclipse.collections.api.factory.map.primitive;

import org.eclipse.collections.api.block.function.Function;
import org.eclipse.collections.api.block.function.primitive.<name>Function;
import org.eclipse.collections.api.map.primitive.MutableObject<name>Map;
import org.eclipse.collections.api.map.primitive.Object<name>Map;

/**
 * A factory which creates instances of type {@link MutableObject<name>Map}.
 * This file was automatically generated from template file mutableObjectPrimitiveMapFactory.stg.
 *
 * @since 6.0.
 */
public interface MutableObject<name>MapFactory
{
    \<K> MutableObject<name>Map\<K> empty();

    /**
     * Same as {@link #empty()}.
     */
    \<K> MutableObject<name>Map\<K> of();

    /**
     * Same as {@link #empty()}.
     */
    \<K> MutableObject<name>Map\<K> with();

    /**
     * @since 11.1.
     */
    default \<K> MutableObject<name>Map\<K> with(K key, <type> value)
    {
        MutableObject<name>Map\<K> map = this.with();
        map.put(key, value);
        return map;
    }

    /**
     * @since 11.1.
     */
    default \<K> MutableObject<name>Map\<K> of(K key, <type> value)
    {
        return this.with(key, value);
    }

    /**
     * @since 11.1.
     */
    default \<K> MutableObject<name>Map\<K> with(K key1, <type> value1, K key2, <type> value2)
    {
        MutableObject<name>Map\<K> map = this.with(key1, value1);
        map.put(key2, value2);
        return map;
    }

    /**
     * @since 11.1.
     */
    default \<K> MutableObject<name>Map\<K> of(K key1, <type> value1, K key2, <type> value2)
    {
        return this.with(key1, value1, key2, value2);
    }

    /**
     * @since 11.1.
     */
    default \<K> MutableObject<name>Map\<K> with(K key1, <type> value1, K key2, <type> value2, K key3, <type> value3)
    {
        MutableObject<name>Map\<K> map = this.with(key1, value1, key2, value2);
        map.put(key3, value3);
        return map;
    }

    /**
     * @since 11.1.
     */
    default \<K> MutableObject<name>Map\<K> of(K key1, <type> value1, K key2, <type> value2, K key3, <type> value3)
    {
        return this.with(key1, value1, key2, value2, key3, value3);
    }

    /**
     * @since 11.1.
     */
    default \<K> MutableObject<name>Map\<K> with(K key1, <type> value1, K key2, <type> value2, K key3, <type> value3, K key4, <type> value4)
    {
        MutableObject<name>Map\<K> map = this.with(key1, value1, key2, value2, key3, value3);
        map.put(key4, value4);
        return map;
    }

    /**
     * @since 11.1.
     */
    default \<K> MutableObject<name>Map\<K> of(K key1, <type> value1, K key2, <type> value2, K key3, <type> value3, K key4, <type> value4)
    {
        return this.with(key1, value1, key2, value2, key3, value3, key4, value4);
    }

    /**
     * Same as {@link #empty()}. but takes in an initial capacity
     */
    \<K> MutableObject<name>Map\<K> ofInitialCapacity(int capacity);

    /**
     * Same as {@link #empty()}. but takes in an initial capacity
     */
    \<K> MutableObject<name>Map\<K> withInitialCapacity(int capacity);

    /**
     * Same as {@link #withAll(Object<name>Map)}.
     */
    \<K> MutableObject<name>Map\<K> ofAll(Object<name>Map\<? extends K> map);

    \<K> MutableObject<name>Map\<K> withAll(Object<name>Map\<? extends K> map);

    /**
     * Creates an {@code MutableObject<name>Map} from an {@code Iterable\<T>} by applying {@code keyFunction} and {@code valueFunction}.
     *
     * @since 10.0
     */
    \<T, K> MutableObject<name>Map\<K> from(Iterable\<T> iterable, Function\<? super T, ? extends K> keyFunction, <name>Function\<? super T> valueFunction);
}

>>
