Package jodd.util
Interface Task
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Piece of code that that has no result and may throw an exception.
Similar to
Runnable or Callable.-
Method Summary
-
Method Details
-
of
Creates a Task from Runnable. -
of
Creates a Task from Callable. -
toRunnable
Wraps a task into a runnable. -
toCallable
Wraps a task into a callable that returnsnull. -
run
Runs a code or throws an exception if unable to do so.- Throws:
Exception- if unable to execute task
-