Package com.landawn.abacus.util
Class Throwables
java.lang.Object
com.landawn.abacus.util.Throwables
Catch checked exception and convert it to
RuntimeException
.- Author:
- Haiyang Li
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
Throwables.BiConsumer<T,
U, E extends Throwable> The Interface BiConsumer.static interface
The Interface BiFunction.static interface
Throwables.BiIntObjConsumer<T,
E extends Throwable> static interface
Throwables.BiIntObjFunction<T,
R, E extends Throwable> static interface
Throwables.BiIntObjPredicate<T,
E extends Throwable> static interface
Throwables.BinaryOperator<T,
E extends Throwable> The Interface BinaryOperator.static interface
Throwables.BiObjIntConsumer<T,
U, E extends Throwable> The Interface IndexedBiConsumer.static interface
The Interface IndexedBiFunction.static interface
Throwables.BiObjIntPredicate<T,
U, E extends Throwable> The Interface IndexedBiPredicate.static interface
Throwables.BiPredicate<T,
U, E extends Throwable> The Interface BiPredicate.static interface
Throwables.BooleanBiConsumer<E extends Throwable>
The Interface BooleanBiConsumer.static interface
Throwables.BooleanBiFunction<R,
E extends Throwable> The Interface BooleanBiFunction.static interface
Throwables.BooleanBinaryOperator<E extends Throwable>
The Interface BooleanBinaryOperator.static interface
Throwables.BooleanBiPredicate<E extends Throwable>
The Interface BooleanBiPredicate.static interface
Throwables.BooleanConsumer<E extends Throwable>
The Interface BooleanConsumer.static interface
Throwables.BooleanFunction<R,
E extends Throwable> The Interface BooleanFunction.static interface
Throwables.BooleanNFunction<R,
E extends Throwable> static interface
Throwables.BooleanPredicate<E extends Throwable>
The Interface BooleanPredicate.static interface
Throwables.BooleanSupplier<E extends Throwable>
The Interface BooleanSupplier.static interface
Throwables.BooleanTernaryOperator<E extends Throwable>
The Interface BooleanTernaryOperator.static interface
Throwables.BooleanTriConsumer<E extends Throwable>
The Interface BooleanTriConsumer.static interface
Throwables.BooleanTriFunction<R,
E extends Throwable> The Interface BooleanTriFunction.static interface
Throwables.BooleanTriPredicate<E extends Throwable>
The Interface BooleanTriPredicate.static interface
Throwables.BooleanUnaryOperator<E extends Throwable>
The Interface BooleanUnaryOperator.static interface
Throwables.ByteBiConsumer<E extends Throwable>
The Interface ByteBiConsumer.static interface
Throwables.ByteBiFunction<R,
E extends Throwable> The Interface ByteBiFunction.static interface
Throwables.ByteBinaryOperator<E extends Throwable>
The Interface ByteBinaryOperator.static interface
Throwables.ByteBiPredicate<E extends Throwable>
The Interface ByteBiPredicate.static interface
Throwables.ByteConsumer<E extends Throwable>
The Interface ByteConsumer.static interface
Throwables.ByteFunction<R,
E extends Throwable> The Interface ByteFunction.static interface
Throwables.ByteNFunction<R,
E extends Throwable> static interface
Throwables.BytePredicate<E extends Throwable>
The Interface BytePredicate.static interface
Throwables.ByteSupplier<E extends Throwable>
The Interface ByteSupplier.static interface
Throwables.ByteTernaryOperator<E extends Throwable>
The Interface ByteTernaryOperator.static interface
Throwables.ByteTriConsumer<E extends Throwable>
The Interface ByteTriConsumer.static interface
Throwables.ByteTriFunction<R,
E extends Throwable> The Interface ByteTriFunction.static interface
Throwables.ByteTriPredicate<E extends Throwable>
The Interface ByteTriPredicate.static interface
Throwables.ByteUnaryOperator<E extends Throwable>
The Interface ByteUnaryOperator.static interface
Throwables.Callable<R,
E extends Throwable> The Interface Callable.static interface
Throwables.CharBiConsumer<E extends Throwable>
The Interface CharBiConsumer.static interface
Throwables.CharBiFunction<R,
E extends Throwable> The Interface CharBiFunction.static interface
Throwables.CharBinaryOperator<E extends Throwable>
The Interface CharBinaryOperator.static interface
Throwables.CharBiPredicate<E extends Throwable>
The Interface CharBiPredicate.static interface
Throwables.CharConsumer<E extends Throwable>
The Interface CharConsumer.static interface
Throwables.CharFunction<R,
E extends Throwable> The Interface CharFunction.static interface
Throwables.CharNFunction<R,
E extends Throwable> static interface
Throwables.CharPredicate<E extends Throwable>
The Interface CharPredicate.static interface
Throwables.CharSupplier<E extends Throwable>
The Interface CharSupplier.static interface
Throwables.CharTernaryOperator<E extends Throwable>
The Interface CharTernaryOperator.static interface
Throwables.CharTriConsumer<E extends Throwable>
The Interface CharTriConsumer.static interface
Throwables.CharTriFunction<R,
E extends Throwable> The Interface CharTriFunction.static interface
Throwables.CharTriPredicate<E extends Throwable>
The Interface CharTriPredicate.static interface
Throwables.CharUnaryOperator<E extends Throwable>
The Interface CharUnaryOperator.static interface
Throwables.Consumer<T,
E extends Throwable> The Interface Consumer.static interface
Throwables.DoubleBiConsumer<E extends Throwable>
The Interface DoubleBiConsumer.static interface
Throwables.DoubleBiFunction<R,
E extends Throwable> The Interface DoubleBiFunction.static interface
Throwables.DoubleBinaryOperator<E extends Throwable>
The Interface DoubleBinaryOperator.static interface
Throwables.DoubleBiPredicate<E extends Throwable>
The Interface DoubleBiPredicate.static interface
Throwables.DoubleConsumer<E extends Throwable>
The Interface DoubleConsumer.static interface
Throwables.DoubleFunction<R,
E extends Throwable> The Interface DoubleFunction.static interface
Throwables.DoubleNFunction<R,
E extends Throwable> static interface
Throwables.DoubleObjConsumer<T,
E extends Throwable> static interface
Throwables.DoubleObjFunction<T,
R, E extends Throwable> static interface
Throwables.DoubleObjPredicate<T,
E extends Throwable> static interface
Throwables.DoublePredicate<E extends Throwable>
The Interface DoublePredicate.static interface
Throwables.DoubleSupplier<E extends Throwable>
The Interface DoubleSupplier.static interface
Throwables.DoubleTernaryOperator<E extends Throwable>
The Interface DoubleTernaryOperator.static interface
Throwables.DoubleToIntFunction<E extends Throwable>
The Interface DoubleToIntFunction.static interface
Throwables.DoubleToLongFunction<E extends Throwable>
The Interface DoubleToLongFunction.static interface
Throwables.DoubleTriConsumer<E extends Throwable>
The Interface DoubleTriConsumer.static interface
Throwables.DoubleTriFunction<R,
E extends Throwable> The Interface DoubleTriFunction.static interface
Throwables.DoubleTriPredicate<E extends Throwable>
The Interface DoubleTriPredicate.static interface
Throwables.DoubleUnaryOperator<E extends Throwable>
The Interface DoubleUnaryOperator.static final class
static final class
The Class EEE.static interface
Throwables.FloatBiConsumer<E extends Throwable>
The Interface FloatBiConsumer.static interface
Throwables.FloatBiFunction<R,
E extends Throwable> The Interface FloatBiFunction.static interface
Throwables.FloatBinaryOperator<E extends Throwable>
The Interface FloatBinaryOperator.static interface
Throwables.FloatBiPredicate<E extends Throwable>
The Interface FloatBiPredicate.static interface
Throwables.FloatConsumer<E extends Throwable>
The Interface FloatConsumer.static interface
Throwables.FloatFunction<R,
E extends Throwable> The Interface FloatFunction.static interface
Throwables.FloatNFunction<R,
E extends Throwable> static interface
Throwables.FloatPredicate<E extends Throwable>
The Interface FloatPredicate.static interface
Throwables.FloatSupplier<E extends Throwable>
The Interface FloatSupplier.static interface
Throwables.FloatTernaryOperator<E extends Throwable>
The Interface FloatTernaryOperator.static interface
Throwables.FloatTriConsumer<E extends Throwable>
The Interface FloatTriConsumer.static interface
Throwables.FloatTriFunction<R,
E extends Throwable> The Interface FloatTriFunction.static interface
Throwables.FloatTriPredicate<E extends Throwable>
The Interface FloatTriPredicate.static interface
Throwables.FloatUnaryOperator<E extends Throwable>
The Interface FloatUnaryOperator.static interface
Throwables.Function<T,
R, E extends Throwable> The Interface Function.static interface
Throwables.IndexedBooleanConsumer<E extends Throwable>
The Interface IndexedBooleanConsumer.static interface
Throwables.IndexedByteConsumer<E extends Throwable>
The Interface IndexedByteConsumer.static interface
Throwables.IndexedCharConsumer<E extends Throwable>
The Interface IndexedCharConsumer.static interface
Throwables.IndexedDoubleConsumer<E extends Throwable>
The Interface IndexedDoubleConsumer.static interface
Throwables.IndexedFloatConsumer<E extends Throwable>
The Interface IndexedFloatConsumer.static interface
Throwables.IndexedIntConsumer<E extends Throwable>
The Interface IndexedIntConsumer.static interface
Throwables.IndexedLongConsumer<E extends Throwable>
The Interface IndexedLongConsumer.static interface
Throwables.IndexedShortConsumer<E extends Throwable>
The Interface IndexedShortConsumer.static interface
Throwables.IntBiConsumer<E extends Throwable>
The Interface IntBiConsumer.static interface
Throwables.IntBiFunction<R,
E extends Throwable> The Interface IntBiFunction.static interface
Throwables.IntBinaryOperator<E extends Throwable>
The Interface IntBinaryOperator.static interface
Throwables.IntBiObjConsumer<T,
U, E extends Throwable> static interface
static interface
Throwables.IntBiObjPredicate<T,
U, E extends Throwable> static interface
Throwables.IntBiPredicate<E extends Throwable>
The Interface IntBiPredicate.static interface
Throwables.IntConsumer<E extends Throwable>
The Interface IntConsumer.static interface
Throwables.IntFunction<R,
E extends Throwable> The Interface IntFunction.static interface
Throwables.IntNFunction<R,
E extends Throwable> static interface
Throwables.IntObjConsumer<T,
E extends Throwable> static interface
Throwables.IntObjFunction<T,
R, E extends Throwable> static interface
Throwables.IntObjOperator<T,
E extends Throwable> The Interface IntObjOperator.static interface
Throwables.IntObjPredicate<T,
E extends Throwable> static interface
Throwables.IntPredicate<E extends Throwable>
The Interface IntPredicate.static interface
Throwables.IntSupplier<E extends Throwable>
The Interface IntSupplier.static interface
Throwables.IntTernaryOperator<E extends Throwable>
The Interface IntTernaryOperator.static interface
Throwables.IntToDoubleFunction<E extends Throwable>
The Interface IntToDoubleFunction.static interface
Throwables.IntToLongFunction<E extends Throwable>
The Interface IntToLongFunction.static interface
Throwables.IntTriConsumer<E extends Throwable>
The Interface IntTriConsumer.static interface
Throwables.IntTriFunction<R,
E extends Throwable> The Interface IntTriFunction.static interface
Throwables.IntTriPredicate<E extends Throwable>
The Interface IntTriPredicate.static interface
Throwables.IntUnaryOperator<E extends Throwable>
The Interface IntUnaryOperator.static interface
Throwables.LongBiConsumer<E extends Throwable>
The Interface LongBiConsumer.static interface
Throwables.LongBiFunction<R,
E extends Throwable> The Interface LongBiFunction.static interface
Throwables.LongBinaryOperator<E extends Throwable>
The Interface LongBinaryOperator.static interface
Throwables.LongBiPredicate<E extends Throwable>
The Interface LongBiPredicate.static interface
Throwables.LongConsumer<E extends Throwable>
The Interface LongConsumer.static interface
Throwables.LongFunction<R,
E extends Throwable> The Interface LongFunction.static interface
Throwables.LongNFunction<R,
E extends Throwable> static interface
Throwables.LongObjConsumer<T,
E extends Throwable> static interface
Throwables.LongObjFunction<T,
R, E extends Throwable> static interface
Throwables.LongObjPredicate<T,
E extends Throwable> static interface
Throwables.LongPredicate<E extends Throwable>
The Interface LongPredicate.static interface
Throwables.LongSupplier<E extends Throwable>
The Interface LongSupplier.static interface
Throwables.LongTernaryOperator<E extends Throwable>
The Interface LongTernaryOperator.static interface
Throwables.LongToDoubleFunction<E extends Throwable>
The Interface LongToDoubleFunction.static interface
Throwables.LongToIntFunction<E extends Throwable>
The Interface LongToIntFunction.static interface
Throwables.LongTriConsumer<E extends Throwable>
The Interface LongTriConsumer.static interface
Throwables.LongTriFunction<R,
E extends Throwable> The Interface LongTriFunction.static interface
Throwables.LongTriPredicate<E extends Throwable>
The Interface LongTriPredicate.static interface
Throwables.LongUnaryOperator<E extends Throwable>
The Interface LongUnaryOperator.static interface
Throwables.NFunction<T,
R, E extends Throwable> static interface
Throwables.ObjBiIntConsumer<T,
E extends Throwable> static interface
Throwables.ObjBiIntFunction<T,
R, E extends Throwable> static interface
Throwables.ObjBiIntPredicate<T,
E extends Throwable> static interface
Throwables.ObjBooleanConsumer<T,
E extends Throwable> The Interface ObjBooleanConsumer.static interface
Throwables.ObjByteConsumer<T,
E extends Throwable> The Interface ObjByteConsumer.static interface
Throwables.ObjCharConsumer<T,
E extends Throwable> The Interface ObjCharConsumer.static interface
Throwables.ObjDoubleConsumer<T,
E extends Throwable> The Interface ObjDoubleConsumer.static interface
Throwables.ObjDoubleFunction<T,
R, E extends Throwable> The Interface ObjDoubleFunction.static interface
Throwables.ObjDoublePredicate<T,
E extends Throwable> The Interface ObjDoublePredicate.static interface
Throwables.ObjFloatConsumer<T,
E extends Throwable> The Interface ObjFloatConsumer.static interface
Throwables.ObjIntConsumer<T,
E extends Throwable> The Interface ObjIntConsumer.static interface
Throwables.ObjIntFunction<T,
R, E extends Throwable> The Interface ObjIntConsumer.static interface
Throwables.ObjIntPredicate<T,
E extends Throwable> The Interface ObjIntPredicate.static class
Throwables.ObjIterator<T,
E extends Throwable> static interface
Throwables.ObjLongConsumer<T,
E extends Throwable> The Interface ObjLongConsumer.static interface
Throwables.ObjLongFunction<T,
R, E extends Throwable> The Interface ObjLongFunction.static interface
Throwables.ObjLongPredicate<T,
E extends Throwable> The Interface ObjLongPredicate.static interface
Throwables.ObjShortConsumer<T,
E extends Throwable> The Interface ObjShortConsumer.static interface
Throwables.Predicate<T,
E extends Throwable> The Interface Predicate.static interface
The Interface QuadConsumer.static interface
The Interface QuadFunction.static interface
The Interface QuadPredicate.static interface
Throwables.Runnable<E extends Throwable>
The Interface Runnable.static interface
Throwables.ShortBiConsumer<E extends Throwable>
The Interface ShortBiConsumer.static interface
Throwables.ShortBiFunction<R,
E extends Throwable> The Interface ShortBiFunction.static interface
Throwables.ShortBinaryOperator<E extends Throwable>
The Interface ShortBinaryOperator.static interface
Throwables.ShortBiPredicate<E extends Throwable>
The Interface ShortBiPredicate.static interface
Throwables.ShortConsumer<E extends Throwable>
The Interface ShortConsumer.static interface
Throwables.ShortFunction<R,
E extends Throwable> The Interface ShortFunction.static interface
Throwables.ShortNFunction<R,
E extends Throwable> static interface
Throwables.ShortPredicate<E extends Throwable>
The Interface ShortPredicate.static interface
Throwables.ShortSupplier<E extends Throwable>
The Interface ShortSupplier.static interface
Throwables.ShortTernaryOperator<E extends Throwable>
The Interface ShortTernaryOperator.static interface
Throwables.ShortTriConsumer<E extends Throwable>
The Interface ShortTriConsumer.static interface
Throwables.ShortTriFunction<R,
E extends Throwable> The Interface ShortTriFunction.static interface
Throwables.ShortTriPredicate<E extends Throwable>
The Interface ShortTriPredicate.static interface
Throwables.ShortUnaryOperator<E extends Throwable>
The Interface ShortUnaryOperator.static interface
Throwables.Supplier<T,
E extends Throwable> The Interface Supplier.static interface
Throwables.TernaryOperator<T,
E extends Throwable> The Interface TernaryOperator.static interface
Throwables.ToBooleanFunction<T,
E extends Throwable> The Interface ToBooleanFunction.static interface
Throwables.ToByteFunction<T,
E extends Throwable> The Interface ToByteFunction.static interface
Throwables.ToCharFunction<T,
E extends Throwable> The Interface ToCharFunction.static interface
Throwables.ToDoubleBiFunction<A,
B, E extends Throwable> The Interface TriDoubleFunction.static interface
Throwables.ToDoubleFunction<T,
E extends Throwable> The Interface ToDoubleFunction.static interface
The Interface TriDoubleFunction.static interface
Throwables.ToFloatFunction<T,
E extends Throwable> The Interface ToFloatFunction.static interface
Throwables.ToIntBiFunction<A,
B, E extends Throwable> The Interface TriIntFunction.static interface
Throwables.ToIntFunction<T,
E extends Throwable> The Interface ToIntFunction.static interface
The Interface TriIntFunction.static interface
Throwables.ToLongBiFunction<A,
B, E extends Throwable> The Interface TriLongFunction.static interface
Throwables.ToLongFunction<T,
E extends Throwable> The Interface ToLongFunction.static interface
The Interface TriLongFunction.static interface
Throwables.ToShortFunction<T,
E extends Throwable> The Interface ToShortFunction.static interface
The Interface TriConsumer.static interface
The Interface TriFunction.static interface
The Interface TriPredicate.static interface
Throwables.UnaryOperator<T,
E extends Throwable> The Interface UnaryOperator. -
Method Summary
Modifier and TypeMethodDescriptionstatic <R> R
call
(Throwables.Callable<R, ? extends Throwable> cmd) static <R> R
call
(Throwables.Callable<R, ? extends Throwable> cmd, Function<? super Throwable, ? extends R> actionOnError) static <R> R
call
(Throwables.Callable<R, ? extends Throwable> cmd, Predicate<? super Throwable> predicate, Supplier<R> supplier) static <R> R
call
(Throwables.Callable<R, ? extends Throwable> cmd, Predicate<? super Throwable> predicate, R defaultValue) static <R> R
call
(Throwables.Callable<R, ? extends Throwable> cmd, Supplier<R> supplier) static <R> R
call
(Throwables.Callable<R, ? extends Throwable> cmd, R defaultValue) static void
run
(Throwables.Runnable<? extends Throwable> cmd) static void
run
(Throwables.Runnable<? extends Throwable> cmd, Consumer<? super Throwable> actionOnError)
-
Method Details
-
run
- Parameters:
cmd
-- Throws:
RuntimeException
- if some error happens
-
run
public static void run(Throwables.Runnable<? extends Throwable> cmd, Consumer<? super Throwable> actionOnError) - Parameters:
cmd
-actionOnError
-
-
call
- Type Parameters:
R
-- Parameters:
cmd
-- Returns:
- Throws:
RuntimeException
- if some error happens
-
call
public static <R> R call(Throwables.Callable<R, ? extends Throwable> cmd, Function<? super Throwable, ? extends R> actionOnError) - Type Parameters:
R
-- Parameters:
cmd
-actionOnError
-- Returns:
-
call
- Type Parameters:
R
-- Parameters:
cmd
-supplier
-- Returns:
-
call
- Type Parameters:
R
-- Parameters:
cmd
-defaultValue
-- Returns:
-
call
public static <R> R call(Throwables.Callable<R, ? extends Throwable> cmd, Predicate<? super Throwable> predicate, Supplier<R> supplier) - Type Parameters:
R
-- Parameters:
cmd
-predicate
-supplier
-- Returns:
- Throws:
RuntimeException
- if some error happens andpredicate
return false.
-
call
public static <R> R call(Throwables.Callable<R, ? extends Throwable> cmd, Predicate<? super Throwable> predicate, R defaultValue) - Type Parameters:
R
-- Parameters:
cmd
-predicate
-defaultValue
-- Returns:
- Throws:
RuntimeException
- if some error happens andpredicate
return false.
-