Package io.github.suppierk.java
Class UnsafeFunctions
java.lang.Object
io.github.suppierk.java.UnsafeFunctions
A utility for nicer wrapping of the unsafe function calls.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T,
U> BiConsumer<T, U> unsafeBiConsumer
(ThrowableBiConsumer<T, U> biConsumer) static <T,
U, R> BiFunction<T, U, R> unsafeBiFunction
(ThrowableBiFunction<T, U, R> biFunction) static <T> BinaryOperator<T>
unsafeBinaryOperator
(ThrowableBinaryOperator<T> binaryOperator) static <T,
U> BiPredicate<T, U> unsafeBiPredicate
(ThrowableBiPredicate<T, U> biPredicate) static BooleanSupplier
unsafeBooleanSupplier
(ThrowableBooleanSupplier booleanSupplier) static <T> Comparator<T>
unsafeComparator
(ThrowableComparator<T> comparator) static <T> Consumer<T>
unsafeConsumer
(ThrowableConsumer<T> consumer) static DoubleBinaryOperator
unsafeDoubleBinaryOperator
(ThrowableDoubleBinaryOperator doubleBinaryOperator) static DoubleConsumer
unsafeDoubleConsumer
(ThrowableDoubleConsumer doubleConsumer) static <R> DoubleFunction<R>
unsafeDoubleFunction
(ThrowableDoubleFunction<R> doubleFunction) static DoublePredicate
unsafeDoublePredicate
(ThrowableDoublePredicate doublePredicate) static DoubleSupplier
unsafeDoubleSupplier
(ThrowableDoubleSupplier doubleSupplier) static DoubleToIntFunction
unsafeDoubleToIntFunction
(ThrowableDoubleToIntFunction doubleToIntFunction) static DoubleToLongFunction
unsafeDoubleToLongFunction
(ThrowableDoubleToLongFunction doubleToLongFunction) static DoubleUnaryOperator
unsafeDoubleUnaryOperator
(ThrowableDoubleUnaryOperator doubleUnaryOperator) static <T,
R> Function<T, R> unsafeFunction
(ThrowableFunction<T, R> function) static IntBinaryOperator
unsafeIntBinaryOperator
(ThrowableIntBinaryOperator intBinaryOperator) static IntConsumer
unsafeIntConsumer
(ThrowableIntConsumer intConsumer) static <R> IntFunction<R>
unsafeIntFunction
(ThrowableIntFunction<R> intFunction) static IntPredicate
unsafeIntPredicate
(ThrowableIntPredicate intPredicate) static IntSupplier
unsafeIntSupplier
(ThrowableIntSupplier intSupplier) static IntToDoubleFunction
unsafeIntToDoubleFunction
(ThrowableIntToDoubleFunction intToDoubleFunction) static IntToLongFunction
unsafeIntToLongFunction
(ThrowableIntToLongFunction intToLongFunction) static IntUnaryOperator
unsafeIntUnaryOperator
(ThrowableIntUnaryOperator intUnaryOperator) static LongBinaryOperator
unsafeLongBinaryOperator
(ThrowableLongBinaryOperator longBinaryOperator) static LongConsumer
unsafeLongConsumer
(ThrowableLongConsumer longConsumer) static <R> LongFunction<R>
unsafeLongFunction
(ThrowableLongFunction<R> longFunction) static LongPredicate
unsafeLongPredicate
(ThrowableLongPredicate longPredicate) static LongSupplier
unsafeLongSupplier
(ThrowableLongSupplier longSupplier) static LongToDoubleFunction
unsafeLongToDoubleFunction
(ThrowableLongToDoubleFunction longToDoubleFunction) static LongToIntFunction
unsafeLongToIntFunction
(ThrowableLongToIntFunction longToIntFunction) static LongUnaryOperator
unsafeLongUnaryOperator
(ThrowableLongUnaryOperator longUnaryOperator) static <T> ObjDoubleConsumer<T>
unsafeObjDoubleConsumer
(ThrowableObjDoubleConsumer<T> objDoubleConsumer) static <T> ObjIntConsumer<T>
unsafeObjIntConsumer
(ThrowableObjIntConsumer<T> objIntConsumer) static <T> ObjLongConsumer<T>
unsafeObjLongConsumer
(ThrowableObjLongConsumer<T> objLongConsumer) static <T> Predicate<T>
unsafePredicate
(ThrowablePredicate<T> predicate) static Runnable
unsafeRunnable
(ThrowableRunnable runnable) static <T> Supplier<T>
unsafeSupplier
(ThrowableSupplier<T> supplier) static <T,
U> ToDoubleBiFunction<T, U> unsafeToDoubleBiFunction
(ThrowableToDoubleBiFunction<T, U> toDoubleBiFunction) static <T> ToDoubleFunction<T>
unsafeToDoubleFunction
(ThrowableToDoubleFunction<T> toDoubleFunction) static <T,
U> ToIntBiFunction<T, U> unsafeToIntBiFunction
(ThrowableToIntBiFunction<T, U> toIntBiFunction) static <T> ToIntFunction<T>
unsafeToIntFunction
(ThrowableToIntFunction<T> toIntFunction) static <T,
U> ToLongBiFunction<T, U> unsafeToLongBiFunction
(ThrowableToLongBiFunction<T, U> toLongBiFunction) static <T> ToLongFunction<T>
unsafeToLongFunction
(ThrowableToLongFunction<T> toLongFunction) static <T> UnaryOperator<T>
unsafeUnaryOperator
(ThrowableUnaryOperator<T> unaryOperator)
-
Method Details
-
unsafeRunnable
-
unsafeBiConsumer
-
unsafeBiFunction
-
unsafeBinaryOperator
-
unsafeBiPredicate
-
unsafeBooleanSupplier
-
unsafeConsumer
-
unsafeComparator
-
unsafeDoubleBinaryOperator
public static DoubleBinaryOperator unsafeDoubleBinaryOperator(ThrowableDoubleBinaryOperator doubleBinaryOperator) -
unsafeDoubleConsumer
-
unsafeDoubleFunction
-
unsafeDoublePredicate
-
unsafeDoubleSupplier
-
unsafeDoubleToIntFunction
public static DoubleToIntFunction unsafeDoubleToIntFunction(ThrowableDoubleToIntFunction doubleToIntFunction) -
unsafeDoubleToLongFunction
public static DoubleToLongFunction unsafeDoubleToLongFunction(ThrowableDoubleToLongFunction doubleToLongFunction) -
unsafeDoubleUnaryOperator
public static DoubleUnaryOperator unsafeDoubleUnaryOperator(ThrowableDoubleUnaryOperator doubleUnaryOperator) -
unsafeFunction
-
unsafeIntBinaryOperator
public static IntBinaryOperator unsafeIntBinaryOperator(ThrowableIntBinaryOperator intBinaryOperator) -
unsafeIntConsumer
-
unsafeIntFunction
-
unsafeIntPredicate
-
unsafeIntSupplier
-
unsafeIntToDoubleFunction
public static IntToDoubleFunction unsafeIntToDoubleFunction(ThrowableIntToDoubleFunction intToDoubleFunction) -
unsafeIntToLongFunction
public static IntToLongFunction unsafeIntToLongFunction(ThrowableIntToLongFunction intToLongFunction) -
unsafeIntUnaryOperator
-
unsafeLongBinaryOperator
public static LongBinaryOperator unsafeLongBinaryOperator(ThrowableLongBinaryOperator longBinaryOperator) -
unsafeLongConsumer
-
unsafeLongFunction
-
unsafeLongPredicate
-
unsafeLongSupplier
-
unsafeLongToDoubleFunction
public static LongToDoubleFunction unsafeLongToDoubleFunction(ThrowableLongToDoubleFunction longToDoubleFunction) -
unsafeLongToIntFunction
public static LongToIntFunction unsafeLongToIntFunction(ThrowableLongToIntFunction longToIntFunction) -
unsafeLongUnaryOperator
public static LongUnaryOperator unsafeLongUnaryOperator(ThrowableLongUnaryOperator longUnaryOperator) -
unsafeObjDoubleConsumer
public static <T> ObjDoubleConsumer<T> unsafeObjDoubleConsumer(ThrowableObjDoubleConsumer<T> objDoubleConsumer) -
unsafeObjIntConsumer
-
unsafeObjLongConsumer
public static <T> ObjLongConsumer<T> unsafeObjLongConsumer(ThrowableObjLongConsumer<T> objLongConsumer) -
unsafePredicate
-
unsafeSupplier
-
unsafeToDoubleBiFunction
public static <T,U> ToDoubleBiFunction<T,U> unsafeToDoubleBiFunction(ThrowableToDoubleBiFunction<T, U> toDoubleBiFunction) -
unsafeToDoubleFunction
public static <T> ToDoubleFunction<T> unsafeToDoubleFunction(ThrowableToDoubleFunction<T> toDoubleFunction) -
unsafeToIntBiFunction
public static <T,U> ToIntBiFunction<T,U> unsafeToIntBiFunction(ThrowableToIntBiFunction<T, U> toIntBiFunction) -
unsafeToIntFunction
-
unsafeToLongBiFunction
public static <T,U> ToLongBiFunction<T,U> unsafeToLongBiFunction(ThrowableToLongBiFunction<T, U> toLongBiFunction) -
unsafeToLongFunction
-
unsafeUnaryOperator
-