Package utility.function
Interface Callback
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A generic functional interface that is more semantically sound than
Runnable. Use
anywhere you wish to have a generic callback function.-
Method Summary
-
Method Details
-
dummy
Creates a dummy callback function. This is useful to avoid usingnull.- Returns:
- a dummy callback function
-
dummyIfNull
Returns the given callback object if it is notnull. Otherwise, adummy()callback is returned. This is useful to avoid usingnull.- Parameters:
c- the callback function to check fornull- Returns:
- a non-null callback function
-
call
void call()The method that will be called.
-