Created
June 11, 2021 07:24
-
-
Save Koboo/6f9bf1087298eef6548e978eb83961f8 to your computer and use it in GitHub Desktop.
Java Consumer imitation with up to 5 parameters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface Handle { | |
interface Two<T1, T2> { | |
void handle(T1 item1, T2 item2); | |
} | |
interface Three<T1, T2, T3> { | |
void handle(T1 item1, T2 item2, T3 item3); | |
} | |
interface Four<T1, T2, T3, T4> { | |
void handle(T1 item1, T2 item2, T3 item3, T4 item4); | |
} | |
interface Five<T1, T2, T3, T4, T5> { | |
void handle(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment