001package Torello.Java.Function;
002
003import java.util.function.Function;
004
005/**
006 * Function-Pointer
007 * <SPAN CLASS=TJF>Input:</SPAN> {@code int, int, float}
008 * <SPAN CLASS=TJF>Output:</SPAN> {@code void}.
009 * 
010 * <BR /><BR />
011 * <EMBED CLASS='external-html' DATA-FILE-ID=THREE_PRIMITIVE_CONS>
012 * <EMBED CLASS="globalDefs" DATA-Type1=int DATA-Type2=int DATA-Type3=float>
013 */
014@FunctionalInterface
015public interface IntIntFloatCons
016{
017    /**
018     * Performs this operation on the given arguments.
019     * <BR /><BR /><EMBED CLASS='external-html' DATA-FILE-ID=FUNC_INTER_METH>
020     *
021     * @param i1 The first integer-parameter.
022     * @param i2 The second integer-parameter.
023     * @param f A {@code 'float'} parameter.
024     */
025    public void accept(int i1, int i2, float f);
026
027    /**
028     * <EMBED CLASS='external-html' DATA-FILE-ID=CON_AND_THEN_METHOD>
029     * @param after The operation to perform after this operation.
030     * @return <EMBED CLASS='external-html' DATA-FILE-ID=CON_AND_THEN_RETURN>
031     * @throws NullPointerException This throws if null is passed to {@code 'after'}.
032     */
033    public default IntIntFloatCons andThen(IntIntFloatCons after)
034    {
035        if (after == null) throw new NullPointerException
036            ("null has been passed to parameter 'after'");
037
038        return (int i1, int i2, float f) ->
039        {
040            this.accept(i1, i2, f);
041            after.accept(i1, i2, f);
042        };
043    }
044}