001package Torello.Java.Function;
002
003/**
004 * Function-Pointer
005 * <SPAN CLASS=TJF>Input:</SPAN> {@code A, B, C, D, E, F}
006 * <SPAN CLASS=TJF>Output:</SPAN>
007 * {@code void}.
008 * 
009 * <BR /><BR />
010 * <EMBED CLASS='external-html' DATA-FILE-ID=BIG_CONSUMER>
011 * <EMBED CLASS="globalDefs" DATA-Name='Hex Consumer' DATA-Number=six>
012 * 
013 * @param <A> The type of the first input-parameter.
014 * @param <B> The type of the second input-parameter.
015 * @param <C> The type of the third input-parameter.
016 * @param <D> The type of the fourth input-parameter.
017 * @param <E> The type of the fifth input-parameter.
018 * @param <F> The type of the last input-parameter.
019 */
020@FunctionalInterface
021public interface HexConsumer<A, B, C, D, E, F>
022{
023    /**
024     * Performs {@code 'this'} operation on the given arguments.
025     * <BR /><BR /><EMBED CLASS='external-html' DATA-FILE-ID=FUNC_INTER_METH>
026     *
027     * @param a the first input argument
028     * @param b the second input argument
029     * @param c the third input argument
030     * @param d the fourth input argument
031     * @param e the fifth input argument
032     * @param f the sixth input argument
033     */
034    public void accept(A a, B b, C c, D d, E e, F f);
035
036    /**
037     * <EMBED CLASS='external-html' DATA-FILE-ID=CON_AND_THEN_METHOD>
038     * @param after <EMBED CLASS='external-html' DATA-FILE-ID=CON_AND_THEN_AFTER>
039     * @return <EMBED CLASS='external-html' DATA-FILE-ID=CON_AND_THEN_RETURN>
040     * @throws NullPointerException if parameter {@code 'other'} is null.
041     */
042    default HexConsumer<A, B, C, D, E, F> andThen
043        (HexConsumer<? super A, ? super B, ? super C, ? super D, ? super E, ? super F> after)
044    {
045        if (after == null)
046            throw new NullPointerException("null has been passed to parameter 'after'");
047
048        return (A a, B b, C c, D d, E e, F f) ->
049        {
050            this.accept(a, b, c, d, e, f);
051            after.accept(a, b, c, d, e, f);
052        };
053    }
054 
055}