Skip to content

Commit f86ba89

Browse files
committed
Support name change for TryCatch
1 parent 2e8db44 commit f86ba89

File tree

12 files changed

+27
-27
lines changed

12 files changed

+27
-27
lines changed

core/src/main/java/fj/F1Functions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,7 @@ static public <A, B> ArrayList<B> mapJ(final F<A, B> f, final ArrayList<A> as) {
840840
* @param t A TryCatch1 to promote
841841
* @return A Validation with an Exception on the failure side and its result on the success side.
842842
*/
843-
static public <A, B, E extends Exception> F<A, Validation<E, B>> toF1(final TryCatch1<A, B, E> t) {
843+
static public <A, B, E extends Exception> F<A, Validation<E, B>> toF1(final Try1<A, B, E> t) {
844844
return a -> {
845845
try {
846846
return Validation.success(t.f(a));

core/src/main/java/fj/F2Functions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ public P3<Stream<Tree<C>>, C, Stream<Tree<C>>> f(final P3<Stream<Tree<A>>, A, St
353353
* @param t A TryCatch2 to promote
354354
* @return A Validation with an Exception on the failure side and its result on the success side.
355355
*/
356-
static public <A, B, C, E extends Exception> F2<A, B, Validation<E, C>> toF2(final TryCatch2<A, B, C, E> t) {
356+
static public <A, B, C, E extends Exception> F2<A, B, Validation<E, C>> toF2(final Try2<A, B, C, E> t) {
357357
return (a, b) -> {
358358
try {
359359
return Validation.success(t.f(a, b));

core/src/main/java/fj/F3Functions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public class F3Functions {
1616
* @param t A TryCatch3 to promote
1717
* @return A Validation with an Exception on the failure side and its result on the success side.
1818
*/
19-
static public <A, B, C, D, E extends Exception> F3<A, B, C, Validation<E, D>> toF3(final TryCatch3<A, B, C, D, E> t) {
19+
static public <A, B, C, D, E extends Exception> F3<A, B, C, Validation<E, D>> toF3(final Try3<A, B, C, D, E> t) {
2020
return (a, b, c) -> {
2121
try {
2222
return success(t.f(a, b, c));

core/src/main/java/fj/F4Functions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class F4Functions {
1414
* @param t A TryCatch4 to promote
1515
* @return A Validation with an Exception on the failure side and its result on the success side.
1616
*/
17-
static public <A, B, C, D, E, Z extends Exception> F4<A, B, C, D, Validation<Z, E>> toF4(final TryCatch4<A, B, C, D, E, Z> t) {
17+
static public <A, B, C, D, E, Z extends Exception> F4<A, B, C, D, Validation<Z, E>> toF4(final Try4<A, B, C, D, E, Z> t) {
1818
return (a, b, c, d) -> {
1919
try {
2020
return Validation.success(t.f(a, b, c, d));

core/src/main/java/fj/F5Functions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public class F5Functions {
1313
* @param t A TryCatch5 to promote
1414
* @return A Validation with an Exception on the failure side and its result on the success side.
1515
*/
16-
static public <A, B, C, D, E, F, Z extends Exception> F5<A, B, C, D, E, Validation<Z, F>> toF5(final TryCatch5<A, B, C, D, E, F, Z> t) {
16+
static public <A, B, C, D, E, F, Z extends Exception> F5<A, B, C, D, E, Validation<Z, F>> toF5(final Try5<A, B, C, D, E, F, Z> t) {
1717
return (a, b, c, d, e) -> {
1818
try {
1919
return Validation.success(t.f(a, b, c, d, e));

core/src/main/java/fj/F6Functions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public class F6Functions {
1313
* @param t A TryCatch6 to promote
1414
* @return A Validation with an Exception on the failure side and its result on the success side.
1515
*/
16-
static public <A, B, C, D, E, F, G, Z extends Exception> F6<A, B, C, D, E, F, Validation<Z, G>> toF6(final TryCatch6<A, B, C, D, E, F, G, Z> t) {
16+
static public <A, B, C, D, E, F, G, Z extends Exception> F6<A, B, C, D, E, F, Validation<Z, G>> toF6(final Try6<A, B, C, D, E, F, G, Z> t) {
1717
return (a, b, c, d, e, f) -> {
1818
try {
1919
return Validation.success(t.f(a, b, c, d, e, f));

core/src/main/java/fj/F7Functions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public class F7Functions {
1313
* @param t A TryCatch7 to promote
1414
* @return A Validation with an Exception on the failure side and its result on the success side.
1515
*/
16-
static public <A, B, C, D, E, F, G, H, Z extends Exception> F7<A, B, C, D, E, F, G, Validation<Z, H>> toF7(final TryCatch7<A, B, C, D, E, F, G, H, Z> t) {
16+
static public <A, B, C, D, E, F, G, H, Z extends Exception> F7<A, B, C, D, E, F, G, Validation<Z, H>> toF7(final Try7<A, B, C, D, E, F, G, H, Z> t) {
1717
return (a, b, c, d, e, f, g) -> {
1818
try {
1919
return Validation.success(t.f(a, b, c, d, e, f, g));

core/src/main/java/fj/F8Functions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public class F8Functions {
1313
* @param t A TryCatch8 to promote
1414
* @return A Validation with an Exception on the failure side and its result on the success side.
1515
*/
16-
static public <A, B, C, D, E, F, G, H, I, Z extends Exception> F8<A, B, C, D, E, F, G, H, Validation<Z, I>> toF8(final TryCatch8<A, B, C, D, E, F, G, H, I, Z> t) {
16+
static public <A, B, C, D, E, F, G, H, I, Z extends Exception> F8<A, B, C, D, E, F, G, H, Validation<Z, I>> toF8(final Try8<A, B, C, D, E, F, G, H, I, Z> t) {
1717
return (a, b, c, d, e, f, g, h) -> {
1818
try {
1919
return Validation.success(t.f(a, b, c, d, e, f, g, h));

core/src/main/java/fj/P1.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ public A f(final B b) {
237237
* @param t A TryCatch0 to promote
238238
* @return A Validation with an Exception on the failure side and its result on the success side.
239239
*/
240-
static public <A, E extends Exception> P1<Validation<E, A>> toP1(final TryCatch0<A, E> t) {
240+
static public <A, E extends Exception> P1<Validation<E, A>> toP1(final Try0<A, E> t) {
241241
return P.lazy(u -> {
242242
try {
243243
return Validation.success(t.f());

core/src/main/java/fj/Try.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,43 +11,43 @@
1111
*/
1212
public class Try {
1313

14-
public static <A, Z extends Exception> P1<Validation<Z, A>> f(TryCatch0<A, Z> t) {
14+
public static <A, Z extends Exception> P1<Validation<Z, A>> f(Try0<A, Z> t) {
1515
return P1.toP1(t);
1616
}
1717

18-
public static <A, B, Z extends Exception> F<A, Validation<Z, B>> f(TryCatch1<A, B, Z> t) {
18+
public static <A, B, Z extends Exception> F<A, Validation<Z, B>> f(Try1<A, B, Z> t) {
1919
return F1Functions.toF1(t);
2020
}
2121

22-
public static <A, B, C, Z extends Exception> F2<A, B, Validation<Z, C>> f(TryCatch2<A, B, C, Z> t) {
22+
public static <A, B, C, Z extends Exception> F2<A, B, Validation<Z, C>> f(Try2<A, B, C, Z> t) {
2323
return F2Functions.toF2(t);
2424
}
2525

26-
public static <A, B, C, D, Z extends Exception> F3<A, B, C, Validation<Z, D>> f(TryCatch3<A, B, C, D, Z> t) {
26+
public static <A, B, C, D, Z extends Exception> F3<A, B, C, Validation<Z, D>> f(Try3<A, B, C, D, Z> t) {
2727
return F3Functions.toF3(t);
2828
}
2929

30-
public static <A, B, C, D, E, Z extends Exception> F4<A, B, C, D, Validation<Z, E>> f(TryCatch4<A, B, C, D, E, Z> t) {
30+
public static <A, B, C, D, E, Z extends Exception> F4<A, B, C, D, Validation<Z, E>> f(Try4<A, B, C, D, E, Z> t) {
3131
return F4Functions.toF4(t);
3232
}
3333

34-
public static <A, B, C, D, E, F$, Z extends Exception> F5<A, B, C, D, E, Validation<Z, F$>> f(TryCatch5<A, B, C, D, E, F$, Z> t) {
34+
public static <A, B, C, D, E, F$, Z extends Exception> F5<A, B, C, D, E, Validation<Z, F$>> f(Try5<A, B, C, D, E, F$, Z> t) {
3535
return F5Functions.toF5(t);
3636
}
3737

38-
public static <A, B, C, D, E, F$, G, Z extends Exception> F6<A, B, C, D, E, F$, Validation<Z, G>> f(TryCatch6<A, B, C, D, E, F$, G, Z> t) {
38+
public static <A, B, C, D, E, F$, G, Z extends Exception> F6<A, B, C, D, E, F$, Validation<Z, G>> f(Try6<A, B, C, D, E, F$, G, Z> t) {
3939
return F6Functions.toF6(t);
4040
}
4141

42-
public static <A, B, C, D, E, F$, G, H, Z extends Exception> F7<A, B, C, D, E, F$, G, Validation<Z, H>> f(TryCatch7<A, B, C, D, E, F$, G, H, Z> t) {
42+
public static <A, B, C, D, E, F$, G, H, Z extends Exception> F7<A, B, C, D, E, F$, G, Validation<Z, H>> f(Try7<A, B, C, D, E, F$, G, H, Z> t) {
4343
return F7Functions.toF7(t);
4444
}
4545

46-
public static <A, B, C, D, E, F$, G, H, I, Z extends Exception> F8<A, B, C, D, E, F$, G, H, Validation<Z, I>> f(TryCatch8<A, B, C, D, E, F$, G, H, I, Z> t) {
46+
public static <A, B, C, D, E, F$, G, H, I, Z extends Exception> F8<A, B, C, D, E, F$, G, H, Validation<Z, I>> f(Try8<A, B, C, D, E, F$, G, H, I, Z> t) {
4747
return F8Functions.toF8(t);
4848
}
4949

50-
public static <A> IO<A> io(TryCatch0<A, ? extends IOException> t) {
50+
public static <A> IO<A> io(Try0<A, ? extends IOException> t) {
5151
return IOFunctions.io(t);
5252
}
5353

0 commit comments

Comments
 (0)