1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50 | package Torello.Java.Function;
/**
* Function-Pointer
* <SPAN CLASS=TJF>Input:</SPAN> {@code A, B, C, D}
* <SPAN CLASS=TJF>Output:</SPAN> {@code void}.
*
* <BR /><BR />
* <EMBED CLASS='external-html' DATA-FILE-ID=BIG_CONSUMER>
* <EMBED CLASS="globalDefs" DATA-Name='Quad Consumer' DATA-Number=four>
*
* @param <A> The type of the first input-parameter.
* @param <B> The type of the second input-parameter.
* @param <C> The type of the third input-parameter.
* @param <D> The type of the last input-parameter.
*/
@FunctionalInterface
public interface QuadConsumer<A, B, C, D>
{
/**
* Performs {@code 'this'} operation on the given arguments.
* <BR /><BR /><EMBED CLASS='external-html' DATA-FILE-ID=FUNC_INTER_METH>
*
* @param a the first input argument
* @param b the second input argument
* @param c the third input argument
* @param d the fourth input argument
*/
public void accept(A a, B b, C c, D d);
/**
* <EMBED CLASS='external-html' DATA-FILE-ID=CON_AND_THEN_METHOD>
* @param after <EMBED CLASS='external-html' DATA-FILE-ID=CON_AND_THEN_AFTER>
* @return <EMBED CLASS='external-html' DATA-FILE-ID=CON_AND_THEN_RETURN>
* @throws NullPointerException if parameter {@code 'other'} is null.
*/
default QuadConsumer<A, B, C, D> andThen
(QuadConsumer<? super A, ? super B, ? super C, ? super D> after)
{
if (after == null)
throw new NullPointerException("null has been passed to parameter 'after'");
return (A a, B b, C c, D d) ->
{
this.accept(a, b, c, d);
after.accept(a, b, c, d);
};
}
}
|