From f7a10e0e57d6f0ea83643c3d5763ff405af73337 Mon Sep 17 00:00:00 2001 From: bculkin2442 Date: Wed, 28 Sep 2016 13:44:04 -0400 Subject: Formatting pass --- BJC-Utils2/src/main/java/bjc/utils/data/IPair.java | 35 ++++++++++++++-------- 1 file changed, 23 insertions(+), 12 deletions(-) (limited to 'BJC-Utils2/src/main/java/bjc/utils/data/IPair.java') diff --git a/BJC-Utils2/src/main/java/bjc/utils/data/IPair.java b/BJC-Utils2/src/main/java/bjc/utils/data/IPair.java index a2a635f..c82cc8e 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/data/IPair.java +++ b/BJC-Utils2/src/main/java/bjc/utils/data/IPair.java @@ -30,7 +30,8 @@ public interface IPair * @return The bound pair */ public IPair bind( - BiFunction> binder); + BiFunction> binder); /** * Bind a function to the left value in this pair @@ -67,8 +68,10 @@ public interface IPair * The pair to combine with * @return The pairs, pairwise combined together */ - public default IPair, IPair> combine( - IPair otherPair) { + public default IPair, + IPair> combine( + IPair otherPair) { return combine(otherPair, (left, otherLeft) -> new Pair<>(left, otherLeft), (right, otherRight) -> new Pair<>(right, otherRight)); @@ -91,10 +94,13 @@ public interface IPair * @param rightCombiner * @return A pair with its values combined */ - public IPair combine( - IPair otherPair, - BiFunction leftCombiner, - BiFunction rightCombiner); + public IPair combine( + IPair otherPair, + BiFunction leftCombiner, + BiFunction rightCombiner); /** * Immediately perfom the specified action with the contents of this @@ -112,22 +118,26 @@ public interface IPair } @Override - default Function, Bifunctor> fmapLeft( - Function func) { + default Function, + Bifunctor> fmapLeft( + Function func) { return (argumentPair) -> { if (!(argumentPair instanceof IPair)) { throw new IllegalArgumentException( "This function can only be applied to instances of IPair"); } - IPair argPair = (IPair) argumentPair; + IPair argPair = (IPair) argumentPair; return argPair.mapLeft(func); }; } @Override - default Function, Bifunctor> + default Function< + Bifunctor, Bifunctor> fmapRight(Function func) { return (argumentPair) -> { @@ -136,7 +146,8 @@ public interface IPair "This function can only be applied to instances of IPair"); } - IPair argPair = (IPair) argumentPair; + IPair argPair = (IPair) argumentPair; return argPair.mapRight(func); }; -- cgit v1.2.3