aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/apache/commons/lang3/Functions.java
diff options
context:
space:
mode:
authorGary Gregory <garydgregory@gmail.com>2020-06-24 10:41:19 -0400
committerGary Gregory <garydgregory@gmail.com>2020-06-24 10:41:19 -0400
commitc56c77ed9502d079b3e885a65bc4a4cf666ac8ee (patch)
treeb3c46d616790dcec387d3fb209dc7b88109b01e3 /src/main/java/org/apache/commons/lang3/Functions.java
parent1dddec8ba867bc31233ba194f0753ea35818cbfd (diff)
downloadapache-commons-lang-c56c77ed9502d079b3e885a65bc4a4cf666ac8ee.tar.gz
Remove methods that will be new in 3.11 but which are now in the
function package.
Diffstat (limited to 'src/main/java/org/apache/commons/lang3/Functions.java')
-rw-r--r--src/main/java/org/apache/commons/lang3/Functions.java115
1 files changed, 0 insertions, 115 deletions
diff --git a/src/main/java/org/apache/commons/lang3/Functions.java b/src/main/java/org/apache/commons/lang3/Functions.java
index 4cf9d5589..a8cba225b 100644
--- a/src/main/java/org/apache/commons/lang3/Functions.java
+++ b/src/main/java/org/apache/commons/lang3/Functions.java
@@ -314,42 +314,6 @@ public class Functions {
}
/**
- * Consumes a consumer and rethrows any exception as a {@link RuntimeException}.
- *
- * @param consumer the consumer to consume
- * @param value the value to consume by {@code consumer}
- * @param <T> the type of checked exception the consumer may throw
- * @since 3.11
- */
- public static <T extends Throwable> void accept(final FailableDoubleConsumer<T> consumer, final double value) {
- run(() -> consumer.accept(value));
- }
-
- /**
- * Consumes a consumer and rethrows any exception as a {@link RuntimeException}.
- *
- * @param consumer the consumer to consume
- * @param value the value to consume by {@code consumer}
- * @param <T> the type of checked exception the consumer may throw
- * @since 3.11
- */
- public static <T extends Throwable> void accept(final FailableIntConsumer<T> consumer, final int value) {
- run(() -> consumer.accept(value));
- }
-
- /**
- * Consumes a consumer and rethrows any exception as a {@link RuntimeException}.
- *
- * @param consumer the consumer to consume
- * @param value the value to consume by {@code consumer}
- * @param <T> the type of checked exception the consumer may throw
- * @since 3.11
- */
- public static <T extends Throwable> void accept(final FailableLongConsumer<T> consumer, final long value) {
- run(() -> consumer.accept(value));
- }
-
- /**
* Applies a function and rethrows any exception as a {@link RuntimeException}.
*
* @param function the function to apply
@@ -381,21 +345,6 @@ public class Functions {
}
/**
- * Applies a function and rethrows any exception as a {@link RuntimeException}.
- *
- * @param function the function to apply
- * @param left the first input to apply {@code function} on
- * @param right the second input to apply {@code function} on
- * @param <T> the type of checked exception the function may throw
- * @return the value returned from the function
- * @since 3.11
- */
- public static <T extends Throwable> double applyAsDouble(final FailableDoubleBinaryOperator<T> function,
- final double left, final double right) {
- return getAsDouble(() -> function.applyAsDouble(left, right));
- }
-
- /**
* Converts the given {@link FailableBiConsumer} into a standard {@link BiConsumer}.
*
* @param <O1> the type of the first argument of the consumers
@@ -537,70 +486,6 @@ public class Functions {
}
/**
- * Invokes a boolean supplier, and returns the result.
- *
- * @param supplier The boolean supplier to invoke.
- * @param <T> The type of checked exception, which the supplier can throw.
- * @return The boolean, which has been created by the supplier
- * @since 3.11
- */
- public static <T extends Throwable> boolean getAsBoolean(final FailableBooleanSupplier<T> supplier) {
- try {
- return supplier.getAsBoolean();
- } catch (final Throwable t) {
- throw rethrow(t);
- }
- }
-
- /**
- * Invokes a double supplier, and returns the result.
- *
- * @param supplier The double supplier to invoke.
- * @param <T> The type of checked exception, which the supplier can throw.
- * @return The boolean, which has been created by the supplier
- * @since 3.11
- */
- public static <T extends Throwable> double getAsDouble(final FailableDoubleSupplier<T> supplier) {
- try {
- return supplier.getAsDouble();
- } catch (final Throwable t) {
- throw rethrow(t);
- }
- }
-
- /**
- * Invokes an int supplier, and returns the result.
- *
- * @param supplier The int supplier to invoke.
- * @param <T> The type of checked exception, which the supplier can throw.
- * @return The boolean, which has been created by the supplier
- * @since 3.11
- */
- public static <T extends Throwable> int getAsInt(final FailableIntSupplier<T> supplier) {
- try {
- return supplier.getAsInt();
- } catch (final Throwable t) {
- throw rethrow(t);
- }
- }
-
- /**
- * Invokes a long supplier, and returns the result.
- *
- * @param supplier The long supplier to invoke.
- * @param <T> The type of checked exception, which the supplier can throw.
- * @return The boolean, which has been created by the supplier
- * @since 3.11
- */
- public static <T extends Throwable> long getAsLong(final FailableLongSupplier<T> supplier) {
- try {
- return supplier.getAsLong();
- } catch (final Throwable t) {
- throw rethrow(t);
- }
- }
-
- /**
* <p>
* Rethrows a {@link Throwable} as an unchecked exception. If the argument is already unchecked, namely a
* {@code RuntimeException} or {@code Error} then the argument will be rethrown without modification. If the