001package Torello.Java.Function;
002
003/**
004 * <CODE>IntBoolConsumer Documentation.</CODE><BR /><BR />
005 * <EMBED CLASS="external-html" DATA-FILE-ID=TWOPRIMCONS>
006 * <EMBED CLASS="globalDefs" DATA-Type1=int DATA-Type2=boolean>
007 */
008@FunctionalInterface
009public interface IntBoolConsumer
010{
011    /**
012     * Performs this operation on the given arguments.
013     * @param i The integer (first) input-argument.
014     * @param b The boolean (second) input-argument.
015     */
016    public void accept(int i, boolean b);
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 IntBoolConsumer andThen(IntBoolConsumer after)
025    {
026        if (after == null)
027            throw new NullPointerException("null has been passed to parameter 'after'");
028
029        return (int i, boolean b) ->
030        {
031            this.accept(i, b); 
032            after.accept(i, b);
033        };
034    }
035
036}