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 BooleanSupplierunsafeBooleanSupplier(ThrowableBooleanSupplier booleanSupplier) static <T> Comparator<T>unsafeComparator(ThrowableComparator<T> comparator) static <T> Consumer<T>unsafeConsumer(ThrowableConsumer<T> consumer) static DoubleBinaryOperatorunsafeDoubleBinaryOperator(ThrowableDoubleBinaryOperator doubleBinaryOperator) static DoubleConsumerunsafeDoubleConsumer(ThrowableDoubleConsumer doubleConsumer) static <R> DoubleFunction<R>unsafeDoubleFunction(ThrowableDoubleFunction<R> doubleFunction) static DoublePredicateunsafeDoublePredicate(ThrowableDoublePredicate doublePredicate) static DoubleSupplierunsafeDoubleSupplier(ThrowableDoubleSupplier doubleSupplier) static DoubleToIntFunctionunsafeDoubleToIntFunction(ThrowableDoubleToIntFunction doubleToIntFunction) static DoubleToLongFunctionunsafeDoubleToLongFunction(ThrowableDoubleToLongFunction doubleToLongFunction) static DoubleUnaryOperatorunsafeDoubleUnaryOperator(ThrowableDoubleUnaryOperator doubleUnaryOperator) static <T,R> Function<T, R> unsafeFunction(ThrowableFunction<T, R> function) static IntBinaryOperatorunsafeIntBinaryOperator(ThrowableIntBinaryOperator intBinaryOperator) static IntConsumerunsafeIntConsumer(ThrowableIntConsumer intConsumer) static <R> IntFunction<R>unsafeIntFunction(ThrowableIntFunction<R> intFunction) static IntPredicateunsafeIntPredicate(ThrowableIntPredicate intPredicate) static IntSupplierunsafeIntSupplier(ThrowableIntSupplier intSupplier) static IntToDoubleFunctionunsafeIntToDoubleFunction(ThrowableIntToDoubleFunction intToDoubleFunction) static IntToLongFunctionunsafeIntToLongFunction(ThrowableIntToLongFunction intToLongFunction) static IntUnaryOperatorunsafeIntUnaryOperator(ThrowableIntUnaryOperator intUnaryOperator) static LongBinaryOperatorunsafeLongBinaryOperator(ThrowableLongBinaryOperator longBinaryOperator) static LongConsumerunsafeLongConsumer(ThrowableLongConsumer longConsumer) static <R> LongFunction<R>unsafeLongFunction(ThrowableLongFunction<R> longFunction) static LongPredicateunsafeLongPredicate(ThrowableLongPredicate longPredicate) static LongSupplierunsafeLongSupplier(ThrowableLongSupplier longSupplier) static LongToDoubleFunctionunsafeLongToDoubleFunction(ThrowableLongToDoubleFunction longToDoubleFunction) static LongToIntFunctionunsafeLongToIntFunction(ThrowableLongToIntFunction longToIntFunction) static LongUnaryOperatorunsafeLongUnaryOperator(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 RunnableunsafeRunnable(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
-