import "copyrightAndOthers.stg"
import "primitiveEquals.stg"
import "primitiveHashCode.stg"
import "primitiveLiteral.stg"

targetPath() ::= "org/eclipse/collections/impl/collection/mutable/primitive"

fileName(primitive) ::= "Unmodifiable<primitive.name>Collection"

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

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

package org.eclipse.collections.impl.collection.mutable.primitive;

import org.eclipse.collections.api.collection.primitive.Mutable<name>Collection;
import org.eclipse.collections.impl.bag.mutable.primitive.<name>HashBag;

/**
 * This file was automatically generated from template file unmodifiablePrimitiveCollection.stg.
 *
 * @since 4.0.
 */
public class Unmodifiable<name>Collection
        extends AbstractUnmodifiable<name>Collection
{
    private static final long serialVersionUID = 1L;

    protected Unmodifiable<name>Collection(Mutable<name>Collection collection)
    {
        super(collection);
    }

    /**
     * This method will take a Mutable<name>Collection and wrap it directly in a Unmodifiable<name>Collection.
     */
    public static Unmodifiable<name>Collection of(Mutable<name>Collection collection)
    {
        if (collection == null)
        {
            throw new IllegalArgumentException("cannot create a Unmodifiable<name>Collection for null");
        }
        return new Unmodifiable<name>Collection(collection);
    }

    /**
     * @since 9.2.
     */
    @Override
    public Mutable<name>Collection newEmpty()
    {
        return new <name>HashBag();
    }
}

>>
