import "copyright.stg"

hasTwoPrimitives() ::= "true"

targetPath() ::= "org/eclipse/collections/api/block/function/primitive"

fileName(primitive1, primitive2, sameTwoPrimitives) ::= "<primitive1.name>To<primitive2.name>Function"

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

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

package org.eclipse.collections.api.block.function.primitive;

import java.io.Serializable;

/**
 * This file was automatically generated from template file primitiveToPrimitiveFunction.stg.
 *
 * @since 3.0.
 */
@FunctionalInterface
public interface <name1>To<name2>Function
        extends <if(primitive1.specializedStream && primitive2.specializedStream && !sameTwoPrimitives)>java.util.function.<name1>To<name2>Function, <elseif(primitive1.specializedStream && sameTwoPrimitives)>java.util.function.<name1>UnaryOperator, <endif>Serializable
{
    <type2> valueOf(<type1> <type1>Parameter);
<if(primitive1.specializedStream && primitive2.specializedStream)>

    @Override
    default <type2> applyAs<name2>(<type1> each)
    {
        return this.valueOf(each);
    }
<endif>
}

>>
