You can create your own interface:
public interface Invokable <T>{
public void invoke(T param);
}
Alternatively, as suggested, you could use the same interface as the Java 8 Consumer
. The source is included in the Java 8 JDK Early Access download, here with all the comments and annotations removed:
public interface Consumer<T>{
void accept(T t)
default Consumer<T> andThen(Consumer<? super T> after)
}