diff --git a/cffu-kotlin/src/main/java/io/foldright/cffu/kotlin/CompletableFutureExtensions.kt b/cffu-kotlin/src/main/java/io/foldright/cffu/kotlin/CompletableFutureExtensions.kt index 4d1a0c64..de4cafff 100644 --- a/cffu-kotlin/src/main/java/io/foldright/cffu/kotlin/CompletableFutureExtensions.kt +++ b/cffu-kotlin/src/main/java/io/foldright/cffu/kotlin/CompletableFutureExtensions.kt @@ -345,9 +345,9 @@ fun CompletionStage<*>.runAfterBothFastFailAsync( * @see CompletableFuture.thenAcceptBoth */ fun CompletionStage.thenAcceptBothFastFail( - cf2: CompletionStage, action: BiConsumer + other: CompletionStage, action: BiConsumer ): CompletableFuture = - CompletableFutureUtils.thenAcceptBothFastFail(this, cf2, action) + CompletableFutureUtils.thenAcceptBothFastFail(this, other, action) /** * Returns a new CompletableFuture that, when tow given stage both complete normally, @@ -364,9 +364,9 @@ fun CompletionStage.thenAcceptBothFastFail( * @see CompletableFuture.thenAcceptBothAsync */ fun CompletionStage.thenAcceptBothFastFailAsync( - cf2: CompletionStage, action: BiConsumer + other: CompletionStage, action: BiConsumer ): CompletableFuture = - CompletableFutureUtils.thenAcceptBothFastFailAsync(this, cf2, action) + CompletableFutureUtils.thenAcceptBothFastFailAsync(this, other, action) /** * Returns a new CompletableFuture that, when tow given stage both complete normally, @@ -383,9 +383,9 @@ fun CompletionStage.thenAcceptBothFastFailAsync( * @see CompletableFuture.thenAcceptBothAsync */ fun CompletionStage.thenAcceptBothFastFailAsync( - cf2: CompletionStage, action: BiConsumer, executor: Executor + other: CompletionStage, action: BiConsumer, executor: Executor ): CompletableFuture = - CompletableFutureUtils.thenAcceptBothFastFailAsync(this, cf2, action, executor) + CompletableFutureUtils.thenAcceptBothFastFailAsync(this, other, action, executor) /** * Returns a new CompletableFuture that, when tow given stage both complete normally, @@ -401,9 +401,9 @@ fun CompletionStage.thenAcceptBothFastFailAsync( * @see CompletableFuture.thenCombine */ fun CompletionStage.thenCombineFastFail( - cf2: CompletionStage, fn: BiFunction + other: CompletionStage, fn: BiFunction ): CompletableFuture = - CompletableFutureUtils.thenCombineFastFail(this, cf2, fn) + CompletableFutureUtils.thenCombineFastFail(this, other, fn) /** * Returns a new CompletableFuture that, when tow given stage both complete normally, @@ -420,9 +420,9 @@ fun CompletionStage.thenCombineFastFail( * @see CompletableFuture.thenCombineAsync */ fun CompletionStage.thenCombineFastFailAsync( - cf2: CompletionStage, fn: BiFunction + other: CompletionStage, fn: BiFunction ): CompletableFuture = - CompletableFutureUtils.thenCombineFastFailAsync(this, cf2, fn) + CompletableFutureUtils.thenCombineFastFailAsync(this, other, fn) /** * Returns a new CompletableFuture that, when tow given stage both complete normally, @@ -439,9 +439,9 @@ fun CompletionStage.thenCombineFastFailAsync( * @see CompletableFuture.thenCombineAsync */ fun CompletionStage.thenCombineFastFailAsync( - cf2: CompletionStage, fn: BiFunction, executor: Executor + other: CompletionStage, fn: BiFunction, executor: Executor ): CompletableFuture = - CompletableFutureUtils.thenCombineFastFailAsync(this, cf2, fn, executor) + CompletableFutureUtils.thenCombineFastFailAsync(this, other, fn, executor) //////////////////////////////////////// //# allTupleOf* methods @@ -601,8 +601,8 @@ fun CompletionStage.allTupleOfFastFail( * @return the new CompletableFuture * @see CompletableFuture.runAfterEither */ -fun CompletionStage<*>.runAfterEitherSuccess(cf2: CompletionStage<*>, action: Runnable): CompletableFuture = - CompletableFutureUtils.runAfterEitherSuccess(this, cf2, action) +fun CompletionStage<*>.runAfterEitherSuccess(other: CompletionStage<*>, action: Runnable): CompletableFuture = + CompletableFutureUtils.runAfterEitherSuccess(this, other, action) /** * Returns a new CompletableFuture that, when either given stage success, executes the given action @@ -618,8 +618,10 @@ fun CompletionStage<*>.runAfterEitherSuccess(cf2: CompletionStage<*>, action: Ru * @return the new CompletableFuture * @see CompletableFuture.runAfterEitherAsync */ -fun CompletionStage<*>.runAfterEitherSuccessAsync(cf2: CompletionStage<*>, action: Runnable): CompletableFuture = - CompletableFutureUtils.runAfterEitherSuccessAsync(this, cf2, action) +fun CompletionStage<*>.runAfterEitherSuccessAsync( + other: CompletionStage<*>, action: Runnable +): CompletableFuture = + CompletableFutureUtils.runAfterEitherSuccessAsync(this, other, action) /** * Returns a new CompletableFuture that, when either given stage success, executes the given action @@ -636,9 +638,9 @@ fun CompletionStage<*>.runAfterEitherSuccessAsync(cf2: CompletionStage<*>, actio * @see CompletableFuture.runAfterEitherAsync */ fun CompletionStage<*>.runAfterEitherSuccessAsync( - cf2: CompletionStage<*>, action: Runnable, executor: Executor + other: CompletionStage<*>, action: Runnable, executor: Executor ): CompletableFuture = - CompletableFutureUtils.runAfterEitherSuccessAsync(this, cf2, action, executor) + CompletableFutureUtils.runAfterEitherSuccessAsync(this, other, action, executor) /** * Returns a new CompletableFuture that, when either given stage success, @@ -652,9 +654,9 @@ fun CompletionStage<*>.runAfterEitherSuccessAsync( * @see CompletableFuture.acceptEither */ fun CompletionStage.acceptEitherSuccess( - cf2: CompletionStage, action: Consumer + other: CompletionStage, action: Consumer ): CompletableFuture = - CompletableFutureUtils.acceptEitherSuccess(this, cf2, action) + CompletableFutureUtils.acceptEitherSuccess(this, other, action) /** * Returns a new CompletionStage that, when either given stage success, @@ -669,9 +671,9 @@ fun CompletionStage.acceptEitherSuccess( * @see CompletableFuture.acceptEitherAsync */ fun CompletionStage.acceptEitherSuccessAsync( - cf2: CompletionStage, action: Consumer + other: CompletionStage, action: Consumer ): CompletableFuture = - CompletableFutureUtils.acceptEitherSuccessAsync(this, cf2, action) + CompletableFutureUtils.acceptEitherSuccessAsync(this, other, action) /** * Returns a new CompletionStage that, when either given stage success, @@ -686,9 +688,9 @@ fun CompletionStage.acceptEitherSuccessAsync( * @see CompletableFuture.acceptEitherAsync */ fun CompletionStage.acceptEitherSuccessAsync( - cf2: CompletionStage, action: Consumer, executor: Executor + other: CompletionStage, action: Consumer, executor: Executor ): CompletableFuture = - CompletableFutureUtils.acceptEitherSuccessAsync(this, cf2, action, executor) + CompletableFutureUtils.acceptEitherSuccessAsync(this, other, action, executor) /** * Returns a new CompletionStage that, when either given stage success, @@ -703,9 +705,9 @@ fun CompletionStage.acceptEitherSuccessAsync( * @see CompletableFuture.applyToEither */ fun CompletionStage.applyToEitherSuccess( - cf2: CompletionStage, fn: Function + other: CompletionStage, fn: Function ): CompletableFuture = - CompletableFutureUtils.applyToEitherSuccess(this, cf2, fn) + CompletableFutureUtils.applyToEitherSuccess(this, other, fn) /** * Returns a new CompletionStage that, when either given stage success, @@ -721,9 +723,9 @@ fun CompletionStage.applyToEitherSuccess( * @see CompletableFuture.applyToEitherAsync */ fun CompletionStage.applyToEitherSuccessAsync( - cf2: CompletionStage, fn: Function + other: CompletionStage, fn: Function ): CompletableFuture = - CompletableFutureUtils.applyToEitherSuccessAsync(this, cf2, fn) + CompletableFutureUtils.applyToEitherSuccessAsync(this, other, fn) /** * Returns a new CompletionStage that, when either given stage success, @@ -739,9 +741,9 @@ fun CompletionStage.applyToEitherSuccessAsync( * @see CompletableFuture.applyToEitherAsync */ fun CompletionStage.applyToEitherSuccessAsync( - cf2: CompletionStage, fn: Function, executor: Executor + other: CompletionStage, fn: Function, executor: Executor ): CompletableFuture = - CompletableFutureUtils.applyToEitherSuccessAsync(this, cf2, fn, executor) + CompletableFutureUtils.applyToEitherSuccessAsync(this, other, fn, executor) //////////////////////////////////////////////////////////////////////////////// //# New enhanced methods