Package org.apache.commons.io.function
Class Erase
java.lang.Object
org.apache.commons.io.function.Erase
Erases
IOException for the compiler but still throws that exception at runtime.- Since:
- 2.16.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static <T,U> void accept(IOBiConsumer<T, U> consumer, T t, U u) Delegates to the givenIOBiConsumerbut erases itsIOExceptionfor the compiler, while still throwing the exception at runtime.(package private) static <T> voidaccept(IOConsumer<T> consumer, T t) Delegates to the givenIOConsumerbut erases itsIOExceptionfor the compiler, while still throwing the exception at runtime.(package private) static <T,U, R> R apply(IOBiFunction<? super T, ? super U, ? extends R> mapper, T t, U u) Delegates to the givenIOBiFunctionbut erases itsIOExceptionfor the compiler, while still throwing the exception at runtime.(package private) static <T,R> R apply(IOFunction<? super T, ? extends R> mapper, T t) Delegates to the givenIOFunctionbut erases itsIOExceptionfor the compiler, while still throwing the exception at runtime.(package private) static <T> intcompare(IOComparator<? super T> comparator, T t, T u) Delegates to the givenIOComparatorbut erases itsIOExceptionfor the compiler, while still throwing the exception at runtime.(package private) static <T> Tget(IOSupplier<T> supplier) Delegates to the givenIOSupplierbut erases itsIOExceptionfor the compiler, while still throwing the exception at runtime.static <T extends Throwable>
RuntimeExceptionThrows the given throwable.(package private) static voidrun(IORunnable runnable) Delegates to the givenIORunnablebut erases itsIOExceptionfor the compiler, while still throwing the exception at runtime.(package private) static <T> booleantest(IOPredicate<? super T> predicate, T t) Delegates to the givenIOPredicatebut erases itsIOExceptionfor the compiler, while still throwing the exception at runtime.
-
Constructor Details
-
Erase
private Erase()No instances.
-
-
Method Details
-
accept
Delegates to the givenIOBiConsumerbut erases itsIOExceptionfor the compiler, while still throwing the exception at runtime.- Type Parameters:
T- See delegate.U- See delegate.- Parameters:
consumer- See delegate.t- See delegate.u- See delegate.- See Also:
-
accept
Delegates to the givenIOConsumerbut erases itsIOExceptionfor the compiler, while still throwing the exception at runtime.- Type Parameters:
T- See delegate.- Parameters:
consumer- See delegate.t- See delegate.- See Also:
-
apply
Delegates to the givenIOBiFunctionbut erases itsIOExceptionfor the compiler, while still throwing the exception at runtime.- Type Parameters:
T- See delegate.U- See delegate.R- See delegate.- Parameters:
mapper- See delegate.t- See delegate.u- See delegate.- Returns:
- See delegate.
- See Also:
-
apply
Delegates to the givenIOFunctionbut erases itsIOExceptionfor the compiler, while still throwing the exception at runtime.- Type Parameters:
T- See delegate.R- See delegate.- Parameters:
mapper- See delegate.t- See delegate.- Returns:
- See delegate.
- See Also:
-
compare
Delegates to the givenIOComparatorbut erases itsIOExceptionfor the compiler, while still throwing the exception at runtime.- Type Parameters:
T- See delegate.- Parameters:
comparator- See delegate.t- See delegate.u- See delegate.- Returns:
- See delegate.
- See Also:
-
get
Delegates to the givenIOSupplierbut erases itsIOExceptionfor the compiler, while still throwing the exception at runtime.- Type Parameters:
T- See delegate.- Parameters:
supplier- See delegate.- Returns:
- See delegate.
- See Also:
-
rethrow
Throws the given throwable.- Type Parameters:
T- The throwable cast type.- Parameters:
throwable- The throwable to rethrow.- Returns:
- nothing because we throw.
- Throws:
T- Always thrown.
-
run
Delegates to the givenIORunnablebut erases itsIOExceptionfor the compiler, while still throwing the exception at runtime.- Parameters:
runnable- See delegate.- See Also:
-
test
Delegates to the givenIOPredicatebut erases itsIOExceptionfor the compiler, while still throwing the exception at runtime.- Type Parameters:
T- See delegate.- Parameters:
predicate- See delegate.t- See delegate.- Returns:
- See delegate.
- See Also:
-