@@ -181,9 +181,9 @@ public static <E extends Throwable> double applyAsDouble(final FailableDoubleBin
181181 * result of the applying function.
182182 *
183183 * <pre>{@code
184- * Failable.applyNotNull ("a", String::toUpperCase) = "A"
185- * Failable.applyNotNull (null, String::toUpperCase) = null
186- * Failable.applyNotNull ("a", s -> null) = null
184+ * Failable.applyNonNull ("a", String::toUpperCase) = "A"
185+ * Failable.applyNonNull (null, String::toUpperCase) = null
186+ * Failable.applyNonNull ("a", s -> null) = null
187187 * }</pre>
188188 * <p>
189189 * Useful when working with expressions that may return {@code null} as it allows a single-line expression without using temporary local variables or
@@ -197,11 +197,11 @@ public static <E extends Throwable> double applyAsDouble(final FailableDoubleBin
197197 * @param mapper The function to apply, must not be {@code null}.
198198 * @return The result of the function (which may be {@code null}) or {@code null} if the input value is {@code null}.
199199 * @throws E Thrown by the given function.
200- * @see #applyNotNull (Object, FailableFunction, FailableFunction)
201- * @see #applyNotNull (Object, FailableFunction, FailableFunction, FailableFunction)
200+ * @see #applyNonNull (Object, FailableFunction, FailableFunction)
201+ * @see #applyNonNull (Object, FailableFunction, FailableFunction, FailableFunction)
202202 * @since 3.19.0
203203 */
204- public static <T , R , E extends Throwable > R applyNotNull (final T value , final FailableFunction <? super T , ? extends R , E > mapper ) throws E {
204+ public static <T , R , E extends Throwable > R applyNonNull (final T value , final FailableFunction <? super T , ? extends R , E > mapper ) throws E {
205205 return value != null ? Objects .requireNonNull (mapper , "mapper" ).apply (value ) : null ;
206206 }
207207
@@ -210,10 +210,10 @@ public static <T, R, E extends Throwable> R applyNotNull(final T value, final Fa
210210 * {@code null}, otherwise this method returns {@code null}.
211211 *
212212 * <pre>{@code
213- * Failable.applyNotNull (" a ", String::toUpperCase, String::trim) = "A"
214- * Failable.applyNotNull (null, String::toUpperCase, String::trim) = null
215- * Failable.applyNotNull (" a ", s -> null, String::trim) = null
216- * Failable.applyNotNull (" a ", String::toUpperCase, s -> null) = null
213+ * Failable.applyNonNull (" a ", String::toUpperCase, String::trim) = "A"
214+ * Failable.applyNonNull (null, String::toUpperCase, String::trim) = null
215+ * Failable.applyNonNull (" a ", s -> null, String::trim) = null
216+ * Failable.applyNonNull (" a ", String::toUpperCase, s -> null) = null
217217 * }</pre>
218218 * <p>
219219 * Useful when working with expressions that may return {@code null} as it allows a single-line expression without using temporary local variables or
@@ -231,25 +231,25 @@ public static <T, R, E extends Throwable> R applyNotNull(final T value, final Fa
231231 * @return The result of the final function (which may be {@code null}) or {@code null} if the input value or any intermediate value is {@code null}.
232232 * @throws E1 Thrown by the first function.
233233 * @throws E2 Thrown by the second function.
234- * @see #applyNotNull (Object, FailableFunction)
235- * @see #applyNotNull (Object, FailableFunction, FailableFunction, FailableFunction)
234+ * @see #applyNonNull (Object, FailableFunction)
235+ * @see #applyNonNull (Object, FailableFunction, FailableFunction, FailableFunction)
236236 * @since 3.19.0
237237 */
238- public static <T , U , R , E1 extends Throwable , E2 extends Throwable > R applyNotNull (final T value1 ,
238+ public static <T , U , R , E1 extends Throwable , E2 extends Throwable > R applyNonNull (final T value1 ,
239239 final FailableFunction <? super T , ? extends U , E1 > mapper1 , final FailableFunction <? super U , ? extends R , E2 > mapper2 ) throws E1 , E2 {
240- return applyNotNull ( applyNotNull (value1 , mapper1 ), mapper2 );
240+ return applyNonNull ( applyNonNull (value1 , mapper1 ), mapper2 );
241241 }
242242
243243 /**
244244 * Applies values to a chain of functions, where a {@code null} can short-circuit each step. A function is only applied if the previous value is not
245245 * {@code null}, otherwise this method returns {@code null}.
246246 *
247247 * <pre>{@code
248- * Failable.applyNotNull (" abc ", String::toUpperCase, String::trim, StringUtils::reverse) = "CBA"
249- * Failable.applyNotNull (null, String::toUpperCase, String::trim, StringUtils::reverse) = null
250- * Failable.applyNotNull (" abc ", s -> null, String::trim, StringUtils::reverse) = null
251- * Failable.applyNotNull (" abc ", String::toUpperCase, s -> null, StringUtils::reverse) = null
252- * Failable.applyNotNull (" abc ", String::toUpperCase, String::trim, s -> null) = null
248+ * Failable.applyNonNull (" abc ", String::toUpperCase, String::trim, StringUtils::reverse) = "CBA"
249+ * Failable.applyNonNull (null, String::toUpperCase, String::trim, StringUtils::reverse) = null
250+ * Failable.applyNonNull (" abc ", s -> null, String::trim, StringUtils::reverse) = null
251+ * Failable.applyNonNull (" abc ", String::toUpperCase, s -> null, StringUtils::reverse) = null
252+ * Failable.applyNonNull (" abc ", String::toUpperCase, String::trim, s -> null) = null
253253 * }</pre>
254254 * <p>
255255 * Useful when working with expressions that may return {@code null} as it allows a single-line expression without using temporary local variables or
@@ -271,14 +271,14 @@ public static <T, U, R, E1 extends Throwable, E2 extends Throwable> R applyNotNu
271271 * @throws E1 Thrown by the first function.
272272 * @throws E2 Thrown by the second function.
273273 * @throws E3 Thrown by the third function.
274- * @see #applyNotNull (Object, FailableFunction)
275- * @see #applyNotNull (Object, FailableFunction, FailableFunction)
274+ * @see #applyNonNull (Object, FailableFunction)
275+ * @see #applyNonNull (Object, FailableFunction, FailableFunction)
276276 * @since 3.19.0
277277 */
278- public static <T , U , V , R , E1 extends Throwable , E2 extends Throwable , E3 extends Throwable > R applyNotNull (final T value1 ,
278+ public static <T , U , V , R , E1 extends Throwable , E2 extends Throwable , E3 extends Throwable > R applyNonNull (final T value1 ,
279279 final FailableFunction <? super T , ? extends U , E1 > mapper1 , final FailableFunction <? super U , ? extends V , E2 > mapper2 ,
280280 final FailableFunction <? super V , ? extends R , E3 > mapper3 ) throws E1 , E2 , E3 {
281- return applyNotNull ( applyNotNull ( applyNotNull (value1 , mapper1 ), mapper2 ), mapper3 );
281+ return applyNonNull ( applyNonNull ( applyNonNull (value1 , mapper1 ), mapper2 ), mapper3 );
282282 }
283283
284284 /**
0 commit comments