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 | package Torello.Java.Function;
import java.util.function.Function;
/**
* Function-Pointer
* <SPAN CLASS=TJF>Input:</SPAN> {@code int, int, byte}
* <SPAN CLASS=TJF>Output:</SPAN> {@code void}.
*
* <BR /><BR />
* <EMBED CLASS='external-html' DATA-FILE-ID=THREE_PRIMITIVE_CONS>
* <EMBED CLASS="globalDefs" DATA-Type1=int DATA-Type2=int DATA-Type3=byte>
*/
@FunctionalInterface
public interface IntIntByteCons
{
/**
* Performs this operation on the given arguments.
* <BR /><BR /><EMBED CLASS='external-html' DATA-FILE-ID=FUNC_INTER_METH>
*
* @param i1 The first integer-parameter.
* @param i2 The second integer-parameter.
* @param b A {@code 'byte'} parameter.
*/
public void accept(int i1, int i2, byte b);
/**
* <EMBED CLASS='external-html' DATA-FILE-ID=CON_AND_THEN_METHOD>
* @param after The operation to perform after this operation.
* @return <EMBED CLASS='external-html' DATA-FILE-ID=CON_AND_THEN_RETURN>
* @throws NullPointerException This throws if null is passed to {@code 'after'}.
*/
public default IntIntByteCons andThen(IntIntByteCons after)
{
if (after == null) throw new NullPointerException
("null has been passed to parameter 'after'");
return (int i1, int i2, byte b) ->
{
this.accept(i1, i2, b);
after.accept(i1, i2, b);
};
}
}
|