001package Torello.Java.Function; 002 003/** 004 * Function-Pointer 005 * <SPAN CLASS=TJF>Input:</SPAN> {@code int, int, T} 006 * <SPAN CLASS=TJF>Output:</SPAN> {@code void}. 007 * 008 * <BR /><BR /> 009 * Utilized in {@link Torello.Java.JSON} 010 * 011 * @param <T> The type of the third (last) input-parameter. 012 */ 013@FunctionalInterface 014public interface IntIntTConsumer<T> 015{ 016 /** 017 * Performs {@code 'this'} operation on the given arguments. 018 * <BR /><BR /><EMBED CLASS='external-html' DATA-FILE-ID=FUNC_INTER_METH> 019 * 020 * @param i First integer argument. 021 * @param j Second integer argument. 022 * @param t Typed {@code object} parameter. 023 */ 024 public void accept(int i, int j, T t); 025 026 /** 027 * <EMBED CLASS='external-html' DATA-FILE-ID=CON_AND_THEN_METHOD> 028 * @param after <EMBED CLASS='external-html' DATA-FILE-ID=CON_AND_THEN_AFTER> 029 * @return <EMBED CLASS='external-html' DATA-FILE-ID=CON_AND_THEN_RETURN> 030 * @throws NullPointerException if parameter {@code 'other'} is null. 031 */ 032 default IntIntTConsumer<T> andThen(IntIntTConsumer<? super T> after) 033 { 034 if (after == null) 035 throw new NullPointerException("null has been passed to parameter 'after'"); 036 037 return (int i, int j, T t) -> 038 { 039 this.accept(i, j, t); 040 after.accept(i, j, t); 041 }; 042 } 043}