0

Where there is already a java substitute for this functional interface:

public interface FunctionA {
       public void run(Person person, Object target);
}

in the form of

BiConsumer<Person, Object>

is there one for this abstract class:

public abstract class ApplicationPlugin {

public abstract void init();

}

where usage is:

public class X extends ApplicationPlugin {
@Override public void init(){
    //stuff
}
}
2
  • Yes, Runnable.
    – daniu
    Jun 14, 2018 at 10:27
  • No idea why this was tagged assembly, because I don't see any CPU instructions or Java bytecode-asm (which has its own tag: java-bytecode-asm). Was this supposed to be tagged .net-assembly? Jun 14, 2018 at 10:46

1 Answer 1

0

Yes, you're looking for the Runnable interface which has a single method taking no parameters and has a void return type.

e.g.

Runnable runnable = () -> doSomething();
0

Not the answer you're looking for? Browse other questions tagged or ask your own question.