public class FunctionalInterfaces
extends Object
If Java 8 lambdas are used to set the callback function, these interface names never need to be explicitly referenced in the code.
webBot.progressReport=(String text, WebBotItem item)->{
webBot.log(String.format("%02d%% %s%s",
webBot.getPercentComplete(),
text==null?"":text,
item==null?"":item.getSourceURI()
));
};
webBot.progressReport=new FunctionalInterfaces.Call_with_String_WebBotItem_return_void() {
public void call(String text, WebBotItem item) {
webBot.log(String.format("%02d%% %s%s",
webBot.getPercentComplete(),
text==null?"":text,
item==null?"":item.getSourceURI()
));
}
};| Modifier and Type | Class and Description |
|---|---|
static interface |
FunctionalInterfaces.Call_with_noargs_return_String
Functional interface for method:
String call() |
static interface |
FunctionalInterfaces.Call_with_noargs_return_void
Functional interface for method:
void call() |
static interface |
FunctionalInterfaces.Call_with_String_return_void
Functional interface for method:
void call(String text) |
static interface |
FunctionalInterfaces.Call_with_String_WebBotItem_return_void
Functional interface for method:
void call(String text, WebBotItem item) |
static interface |
FunctionalInterfaces.Call_with_WebBotItem_return_boolean
Functional interface for method:
boolean call(WebBotItem item) |
static interface |
FunctionalInterfaces.Call_with_WebBotItem_return_String
Functional interface for method:
String call(WebBotItem item) |
static interface |
FunctionalInterfaces.Call_with_WebBotItem_return_void
Functional interface for method:
void call(WebBotItem item) |
static interface |
FunctionalInterfaces.Call_with_WebBotItem_Source_OutputDocument_return_void
Functional interface for method:
void call(WebBotItem item, Source source, OutputDocument outputDocument) |