From 27bf571d6413c3cc6a5d664b5bddd38d21d7b1cd Mon Sep 17 00:00:00 2001 From: EVE Date: Mon, 13 Mar 2017 16:42:21 -0400 Subject: Formatting --- .../utils/data/internals/HalfBoundLazyPair.java | 29 ++++++++-------------- 1 file changed, 11 insertions(+), 18 deletions(-) (limited to 'BJC-Utils2/src/main/java/bjc/utils/data/internals/HalfBoundLazyPair.java') diff --git a/BJC-Utils2/src/main/java/bjc/utils/data/internals/HalfBoundLazyPair.java b/BJC-Utils2/src/main/java/bjc/utils/data/internals/HalfBoundLazyPair.java index 1e8d109..a8bdb6a 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/data/internals/HalfBoundLazyPair.java +++ b/BJC-Utils2/src/main/java/bjc/utils/data/internals/HalfBoundLazyPair.java @@ -12,17 +12,15 @@ import bjc.utils.data.LazyPair; /* * A lazy pair, with only one side bound */ -public class HalfBoundLazyPair - implements IPair { - private Supplier oldSupplier; +public class HalfBoundLazyPair implements IPair { + private Supplier oldSupplier; - private Function> binder; + private Function> binder; - private IPair boundPair; - private boolean pairBound; + private IPair boundPair; + private boolean pairBound; - public HalfBoundLazyPair(Supplier oldSupp, - Function> bindr) { + public HalfBoundLazyPair(Supplier oldSupp, Function> bindr) { oldSupplier = oldSupp; binder = bindr; } @@ -30,8 +28,7 @@ public class HalfBoundLazyPair @Override public IPair bind( BiFunction> bindr) { - IHolder> newPair = new Identity<>( - boundPair); + IHolder> newPair = new Identity<>(boundPair); IHolder newPairMade = new Identity<>(pairBound); Supplier leftSupp = () -> { @@ -94,16 +91,14 @@ public class HalfBoundLazyPair BiFunction rightCombiner) { return otherPair.bind((otherLeft, otherRight) -> { return bind((leftVal, rightVal) -> { - return new LazyPair<>( - leftCombiner.apply(leftVal, otherLeft), + return new LazyPair<>(leftCombiner.apply(leftVal, otherLeft), rightCombiner.apply(rightVal, otherRight)); }); }); } @Override - public IPair mapLeft( - Function mapper) { + public IPair mapLeft(Function mapper) { Supplier leftSupp = () -> { if (pairBound) { return mapper.apply(boundPair.getLeft()); @@ -126,8 +121,7 @@ public class HalfBoundLazyPair } @Override - public IPair mapRight( - Function mapper) { + public IPair mapRight(Function mapper) { Supplier leftSupp = () -> { if (pairBound) { return boundPair.getLeft(); @@ -150,8 +144,7 @@ public class HalfBoundLazyPair } @Override - public MergedType merge( - BiFunction merger) { + public MergedType merge(BiFunction merger) { if (!pairBound) { boundPair = binder.apply(oldSupplier.get()); -- cgit v1.2.3