An implementation of the Callback interface which delegates to a passed
in function.
JavaFX uses Callback objects in many places. In Scala code, it is more
convenient to deal with function objects. This class provides a way to
create a callback object for a function.
Unfortunately, it does not help much to provide an implicit
conversion; the compiler is not able to infer the correct type parameters.
Therefore, it is easier to create callback objects manually; then the
function literals can be expressed in a shorter form.
An implementation of the Callback interface which delegates to a passed in function.
JavaFX uses Callback objects in many places. In Scala code, it is more convenient to deal with function objects. This class provides a way to create a callback object for a function.
Unfortunately, it does not help much to provide an implicit conversion; the compiler is not able to infer the correct type parameters. Therefore, it is easier to create callback objects manually; then the function literals can be expressed in a shorter form.
the parameter type of the callback
the return type of the callback