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