From f7a10e0e57d6f0ea83643c3d5763ff405af73337 Mon Sep 17 00:00:00 2001 From: bculkin2442 Date: Wed, 28 Sep 2016 13:44:04 -0400 Subject: Formatting pass --- .../src/main/java/bjc/utils/data/Either.java | 25 ++++++++++++++-------- 1 file changed, 16 insertions(+), 9 deletions(-) (limited to 'BJC-Utils2/src/main/java/bjc/utils/data/Either.java') diff --git a/BJC-Utils2/src/main/java/bjc/utils/data/Either.java b/BJC-Utils2/src/main/java/bjc/utils/data/Either.java index 9418882..aa38959 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/data/Either.java +++ b/BJC-Utils2/src/main/java/bjc/utils/data/Either.java @@ -26,10 +26,12 @@ public class Either * The value to put on the left * @return An either with the left side occupied */ - public static Either fromLeft( - LeftType left) { + public static Either fromLeft( + LeftType left) { return new Either<>(left, null); } + /** * Create a new either with the right value occupied * @@ -41,8 +43,9 @@ public class Either * The value to put on the right * @return An either with the right side occupied */ - public static Either fromRight( - RightType right) { + public static Either fromRight( + RightType right) { return new Either<>(null, right); } @@ -64,7 +67,8 @@ public class Either @Override public IPair bind( - BiFunction> binder) { + BiFunction> binder) { return binder.apply(leftVal, rightVal); } @@ -89,10 +93,13 @@ public class Either } @Override - public IPair combine( - IPair otherPair, - BiFunction leftCombiner, - BiFunction rightCombiner) { + public IPair combine( + IPair otherPair, + BiFunction leftCombiner, + BiFunction rightCombiner) { if (isLeft) { return otherPair.bind((otherLeft, otherRight) -> { return new Either<>(leftCombiner.apply(leftVal, otherLeft), -- cgit v1.2.3