i want to create an class which accept "function" and i can add there some method that i can call later. For example:
final Wrapper wrapper = new Wrapper();
wrapper.add(() -> System.out.println("Test"));
wrapper.add(() -> <something else>);
wrapper.add(() -> <something else>);
And later i can call it like:
wrapper.get(0).execute();
Is there any way using Function<?>
Thanks a lot.