Package org.apache.commons.io.function
Interface IORunnable
-
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface IORunnableLikeRunnablebut throwsIOException.- Since:
- 2.12.0
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default java.lang.RunnableasRunnable()Creates aRunnablefor this instance that throwsUncheckedIOExceptioninstead ofIOException.static IORunnablenoop()Returns the constant no-op runnable.voidrun()LikeRunnable.run()but throwsIOException.
-
-
-
Method Detail
-
noop
static IORunnable noop()
Returns the constant no-op runnable.- Returns:
- a constant no-op runnable.
- Since:
- 2.16.0
-
asRunnable
default java.lang.Runnable asRunnable()
Creates aRunnablefor this instance that throwsUncheckedIOExceptioninstead ofIOException.- Returns:
- an UncheckedIOException Predicate.
-
run
void run() throws java.io.IOException
LikeRunnable.run()but throwsIOException.- Throws:
java.io.IOException- if an I/O error occurs.
-
-