001package Torello.Java.Function;
002
003/**
004 * <CODE>IntDoubleConsumer Documentation.</CODE><BR /><BR />
005 * <EMBED CLASS="external-html" DATA-FILE-ID=TWOPRIMCONS>
006 * <EMBED CLASS="globalDefs" DATA-Type1=int DATA-Type2=double>
007 */
008@FunctionalInterface
009public interface IntDoubleConsumer
010{
011    /**
012     * Performs this operation on the given arguments.
013     * @param i The integer (first) input-argument.
014     * @param d The double (second) input-argument.
015     */
016    public void accept(int i, double d);
017
018    /**
019     * <EMBED CLASS="external-html" DATA-FILE-ID="CONTHENMETH">
020     * @param after <EMBED CLASS="external-html" DATA-FILE-ID="CONTHENAFT">
021     * @return <EMBED CLASS="external-html" DATA-FILE-ID="CONTHENRET">
022     * @throws NullPointerException if parameter {@code 'other'} is null.
023     */
024    default IntDoubleConsumer andThen(IntDoubleConsumer after)
025    {
026        if (after == null)
027            throw new NullPointerException("null has been passed to parameter 'after'");
028
029        return (int i, double d) ->
030        {
031            this.accept(i, d); 
032            after.accept(i, d);
033        };
034    }
035
036}