@@ -121,7 +121,6 @@ static <T1, T2, T3, T4, R> CheckedFunction4<T1, T2, T3, T4, R> of(CheckedFunctio
121121 * @return a function that applies arguments to the given {@code partialFunction} and returns {@code Some(result)}
122122 * if the function is defined for the given arguments, and {@code None} otherwise.
123123 */
124- @ SuppressWarnings ("RedundantTypeArguments" )
125124 static <T1 , T2 , T3 , T4 , R > Function4 <T1 , T2 , T3 , T4 , Option <R >> lift (CheckedFunction4 <? super T1 , ? super T2 , ? super T3 , ? super T4 , ? extends R > partialFunction ) {
126125 return (t1 , t2 , t3 , t4 ) -> Try .<R >of (() -> partialFunction .apply (t1 , t2 , t3 , t4 )).toOption ();
127126 }
@@ -331,59 +330,59 @@ default <V> CheckedFunction4<T1, T2, T3, T4, V> andThen(CheckedFunction1<? super
331330 }
332331
333332 /**
334- * Returns a composed function that first applies the {@linkplain Function} {@code before1 } to the
333+ * Returns a composed function that first applies the {@linkplain Function} {@code before } to the
335334 * 1st argument and then applies this CheckedFunction4 to the result and the other arguments.
336335 *
337- * @param <S> argument type of before1
338- * @param before1 the function applied before this
339- * @return a function composed of before1 and this
340- * @throws NullPointerException if before1 is null
336+ * @param <S> argument type of before
337+ * @param before the function applied before this
338+ * @return a function composed of before and this
339+ * @throws NullPointerException if before is null
341340 */
342- default <S > CheckedFunction4 <S , T2 , T3 , T4 , R > compose1 (Function1 <? super S , ? extends T1 > before1 ) {
343- Objects .requireNonNull (before1 , "before1 is null" );
344- return (S s , T2 t2 , T3 t3 , T4 t4 ) -> apply (before1 .apply (s ), t2 , t3 , t4 );
341+ default <S > CheckedFunction4 <S , T2 , T3 , T4 , R > compose1 (Function1 <? super S , ? extends T1 > before ) {
342+ Objects .requireNonNull (before , "before is null" );
343+ return (S s , T2 t2 , T3 t3 , T4 t4 ) -> apply (before .apply (s ), t2 , t3 , t4 );
345344 }
346345
347346 /**
348- * Returns a composed function that first applies the {@linkplain Function} {@code before2 } to the
347+ * Returns a composed function that first applies the {@linkplain Function} {@code before } to the
349348 * 2nd argument and then applies this CheckedFunction4 to the result and the other arguments.
350349 *
351- * @param <S> argument type of before2
352- * @param before2 the function applied before this
353- * @return a function composed of before2 and this
354- * @throws NullPointerException if before2 is null
350+ * @param <S> argument type of before
351+ * @param before the function applied before this
352+ * @return a function composed of before and this
353+ * @throws NullPointerException if before is null
355354 */
356- default <S > CheckedFunction4 <T1 , S , T3 , T4 , R > compose2 (Function1 <? super S , ? extends T2 > before2 ) {
357- Objects .requireNonNull (before2 , "before2 is null" );
358- return (T1 t1 , S s , T3 t3 , T4 t4 ) -> apply (t1 , before2 .apply (s ), t3 , t4 );
355+ default <S > CheckedFunction4 <T1 , S , T3 , T4 , R > compose2 (Function1 <? super S , ? extends T2 > before ) {
356+ Objects .requireNonNull (before , "before is null" );
357+ return (T1 t1 , S s , T3 t3 , T4 t4 ) -> apply (t1 , before .apply (s ), t3 , t4 );
359358 }
360359
361360 /**
362- * Returns a composed function that first applies the {@linkplain Function} {@code before3 } to the
361+ * Returns a composed function that first applies the {@linkplain Function} {@code before } to the
363362 * 3rd argument and then applies this CheckedFunction4 to the result and the other arguments.
364363 *
365- * @param <S> argument type of before3
366- * @param before3 the function applied before this
367- * @return a function composed of before3 and this
368- * @throws NullPointerException if before3 is null
364+ * @param <S> argument type of before
365+ * @param before the function applied before this
366+ * @return a function composed of before and this
367+ * @throws NullPointerException if before is null
369368 */
370- default <S > CheckedFunction4 <T1 , T2 , S , T4 , R > compose3 (Function1 <? super S , ? extends T3 > before3 ) {
371- Objects .requireNonNull (before3 , "before3 is null" );
372- return (T1 t1 , T2 t2 , S s , T4 t4 ) -> apply (t1 , t2 , before3 .apply (s ), t4 );
369+ default <S > CheckedFunction4 <T1 , T2 , S , T4 , R > compose3 (Function1 <? super S , ? extends T3 > before ) {
370+ Objects .requireNonNull (before , "before is null" );
371+ return (T1 t1 , T2 t2 , S s , T4 t4 ) -> apply (t1 , t2 , before .apply (s ), t4 );
373372 }
374373
375374 /**
376- * Returns a composed function that first applies the {@linkplain Function} {@code before4 } to the
375+ * Returns a composed function that first applies the {@linkplain Function} {@code before } to the
377376 * 4th argument and then applies this CheckedFunction4 to the result and the other arguments.
378377 *
379- * @param <S> argument type of before4
380- * @param before4 the function applied before this
381- * @return a function composed of before4 and this
382- * @throws NullPointerException if before4 is null
378+ * @param <S> argument type of before
379+ * @param before the function applied before this
380+ * @return a function composed of before and this
381+ * @throws NullPointerException if before is null
383382 */
384- default <S > CheckedFunction4 <T1 , T2 , T3 , S , R > compose4 (Function1 <? super S , ? extends T4 > before4 ) {
385- Objects .requireNonNull (before4 , "before4 is null" );
386- return (T1 t1 , T2 t2 , T3 t3 , S s ) -> apply (t1 , t2 , t3 , before4 .apply (s ));
383+ default <S > CheckedFunction4 <T1 , T2 , T3 , S , R > compose4 (Function1 <? super S , ? extends T4 > before ) {
384+ Objects .requireNonNull (before , "before is null" );
385+ return (T1 t1 , T2 t2 , T3 t3 , S s ) -> apply (t1 , t2 , t3 , before .apply (s ));
387386 }
388387}
389388
0 commit comments