import "copyrightAndOthers.stg"

hasTwoPrimitives() ::= "true"

skipBooleanKeys() ::= "true"

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

fileName(primitive1, primitive2, sameTwoPrimitives) ::= "Mutable<primitive1.name><primitive2.name>MapFactory"

class(primitive1, primitive2, sameTwoPrimitives) ::= <<
<body(primitive1.type, primitive2.type, primitive1.name, primitive2.name)>
>>

body(type1, type2, name1, name2) ::= <<
<copyrightAndOthers()>

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

import org.eclipse.collections.api.block.function.primitive.<name1>Function;
<if(!sameTwoPrimitives)>import org.eclipse.collections.api.block.function.primitive.<name2>Function;<endif>
import org.eclipse.collections.api.map.primitive.Mutable<name1><name2>Map;
import org.eclipse.collections.api.map.primitive.<name1><name2>Map;

/**
 * A factory which creates instances of type {@link Mutable<name1><name2>Map}.
 * This file was automatically generated from template file mutablePrimitivePrimitiveMapFactory.stg.
 *
 * @since 6.0.
 */
public interface Mutable<name1><name2>MapFactory
{
    Mutable<name1><name2>Map empty();

    /**
     * Same as {@link #empty()}.
     */
    Mutable<name1><name2>Map of();

    /**
     * Same as {@link #empty()}.
     */
    Mutable<name1><name2>Map with();

    /**
     * @since 11.1.
     */
    default Mutable<name1><name2>Map of(<type1> key, <type2> value)
    {
        return this.with(key, value);
    }

    /**
     * @since 11.1.
     */
    default Mutable<name1><name2>Map with(<type1> key, <type2> value)
    {
        return this.with().withKeyValue(key, value);
    }

    /**
     * @since 11.1.
     */
    default Mutable<name1><name2>Map of(<type1> key1, <type2> value1, <type1> key2, <type2> value2)
    {
        return this.with(key1, value1, key2, value2);
    }

    /**
     * @since 11.1.
     */
    default Mutable<name1><name2>Map with(<type1> key1, <type2> value1, <type1> key2, <type2> value2)
    {
        return this.with(key1, value1).withKeyValue(key1, value2);
    }

    /**
     * @since 11.1.
     */
    default Mutable<name1><name2>Map of(<type1> key1, <type2> value1, <type1> key2, <type2> value2, <type1> key3, <type2> value3)
    {
        return this.with(key1, value1, key2, value2, key3, value3);
    }

    /**
     * @since 11.1.
     */
    default Mutable<name1><name2>Map with(<type1> key1, <type2> value1, <type1> key2, <type2> value2, <type1> key3, <type2> value3)
    {
        return this.with(key1, value1, key2, value2).withKeyValue(key3, value3);
    }

    /**
     * @since 11.1.
     */
    default Mutable<name1><name2>Map of(<type1> key1, <type2> value1, <type1> key2, <type2> value2, <type1> key3, <type2> value3, <type1> key4, <type2> value4)
    {
        return this.with(key1, value1, key2, value2, key3, value3, key4, value4);
    }

    /**
     * @since 11.1.
     */
    default Mutable<name1><name2>Map with(<type1> key1, <type2> value1, <type1> key2, <type2> value2, <type1> key3, <type2> value3, <type1> key4, <type2> value4)
    {
        return this.with(key1, value1, key2, value2, key3, value3).withKeyValue(key4, value4);
    }

    /**
     * Same as {@link #empty()}. but takes in an initial capacity
     */
    Mutable<name1><name2>Map ofInitialCapacity(int capacity);

    /**
     * Same as {@link #empty()}. but takes in an initial capacity
     */
    Mutable<name1><name2>Map withInitialCapacity(int capacity);

    /**
     * Same as {@link #withAll(<name1><name2>Map)}.
     */
    Mutable<name1><name2>Map ofAll(<name1><name2>Map map);

    Mutable<name1><name2>Map withAll(<name1><name2>Map map);

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

>>
