001package Torello.Java.Function; 002 003import java.util.function.Function; 004 005/** 006 * Function-Pointer 007 * <SPAN CLASS=TJF>Input:</SPAN> {@code int, int, short} 008 * <SPAN CLASS=TJF>Output:</SPAN> {@code void}. 009 * 010 * <BR /><BR /> 011 * <EMBED CLASS='external-html' DATA-FILE-ID=THREE_PRIMITIVE_CONS> 012 * <EMBED CLASS="globalDefs" DATA-Type1=int DATA-Type2=int DATA-Type3=short> 013 */ 014@FunctionalInterface 015public interface IntIntShortCons 016{ 017 /** 018 * Performs this operation on the given arguments. 019 * <BR /><BR /><EMBED CLASS='external-html' DATA-FILE-ID=FUNC_INTER_METH> 020 * 021 * @param i1 The first integer-parameter. 022 * @param i2 The second integer-parameter. 023 * @param s A {@code 'short'} parameter. 024 */ 025 public void accept(int i1, int i2, short s); 026 027 /** 028 * <EMBED CLASS='external-html' DATA-FILE-ID=CON_AND_THEN_METHOD> 029 * @param after The operation to perform after this operation. 030 * @return <EMBED CLASS='external-html' DATA-FILE-ID=CON_AND_THEN_RETURN> 031 * @throws NullPointerException This throws if null is passed to {@code 'after'}. 032 */ 033 public default IntIntShortCons andThen(IntIntShortCons after) 034 { 035 if (after == null) throw new NullPointerException 036 ("null has been passed to parameter 'after'"); 037 038 return (int i1, int i2, short s) -> 039 { 040 this.accept(i1, i2, s); 041 after.accept(i1, i2, s); 042 }; 043 } 044}