From df94066e3af02ff02d5ab4d033a3d603f743234c Mon Sep 17 00:00:00 2001 From: bjculkin Date: Mon, 12 Feb 2018 22:45:04 -0500 Subject: Formatting pass --- .../utils/data/internals/HalfBoundLazyPair.java | 28 +++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'base/src/main/java/bjc/utils/data/internals/HalfBoundLazyPair.java') diff --git a/base/src/main/java/bjc/utils/data/internals/HalfBoundLazyPair.java b/base/src/main/java/bjc/utils/data/internals/HalfBoundLazyPair.java index 5467255..4803bc2 100644 --- a/base/src/main/java/bjc/utils/data/internals/HalfBoundLazyPair.java +++ b/base/src/main/java/bjc/utils/data/internals/HalfBoundLazyPair.java @@ -31,18 +31,18 @@ public class HalfBoundLazyPair implements IPair> binder; /* The new bound pair. */ - private IPair boundPair; + private IPair boundPair; /* Has the pair been bound yet or not? */ - private boolean pairBound; + private boolean pairBound; /** * Create a new half-bound lazy pair. * * @param oldSupp - * The supplier of the old value. + * The supplier of the old value. * * @param bindr - * The function to use to create the pair from the old value. + * The function to use to create the pair from the old value. */ public HalfBoundLazyPair(final Supplier oldSupp, final Function> bindr) { @@ -57,7 +57,7 @@ public class HalfBoundLazyPair implements IPair newPairMade = new Identity<>(pairBound); final Supplier leftSupp = () -> { - if (!newPairMade.getValue()) { + if(!newPairMade.getValue()) { /* Bind the pair if it hasn't been bound yet. */ newPair.replace(binder.apply(oldSupplier.get())); newPairMade.replace(true); @@ -67,7 +67,7 @@ public class HalfBoundLazyPair implements IPair rightSupp = () -> { - if (!newPairMade.getValue()) { + if(!newPairMade.getValue()) { /* Bind the pair if it hasn't been bound yet. */ newPair.replace(binder.apply(oldSupplier.get())); newPairMade.replace(true); @@ -85,7 +85,7 @@ public class HalfBoundLazyPair implements IPair leftSupp = () -> { IPair newPair = boundPair; - if (!pairBound) { + if(!pairBound) { newPair = binder.apply(oldSupplier.get()); } @@ -101,7 +101,7 @@ public class HalfBoundLazyPair implements IPair rightSupp = () -> { IPair newPair = boundPair; - if (!pairBound) { + if(!pairBound) { newPair = binder.apply(oldSupplier.get()); } @@ -118,7 +118,7 @@ public class HalfBoundLazyPair implements IPair rightCombiner) { return otherPair.bind((otherLeft, otherRight) -> { return bind((leftVal, rightVal) -> { - CombinedLeft cLeft = leftCombiner.apply(leftVal, otherLeft); + CombinedLeft cLeft = leftCombiner.apply(leftVal, otherLeft); CombinedRight cRight = rightCombiner.apply(rightVal, otherRight); return new LazyPair<>(cLeft, cRight); @@ -129,7 +129,7 @@ public class HalfBoundLazyPair implements IPair IPair mapLeft(final Function mapper) { final Supplier leftSupp = () -> { - if (pairBound) return mapper.apply(boundPair.getLeft()); + if(pairBound) return mapper.apply(boundPair.getLeft()); final NewLeft leftVal = binder.apply(oldSupplier.get()).getLeft(); @@ -137,7 +137,7 @@ public class HalfBoundLazyPair implements IPair rightSupp = () -> { - if (pairBound) return boundPair.getRight(); + if(pairBound) return boundPair.getRight(); return binder.apply(oldSupplier.get()).getRight(); }; @@ -148,13 +148,13 @@ public class HalfBoundLazyPair implements IPair IPair mapRight(final Function mapper) { final Supplier leftSupp = () -> { - if (pairBound) return boundPair.getLeft(); + if(pairBound) return boundPair.getLeft(); return binder.apply(oldSupplier.get()).getLeft(); }; final Supplier rightSupp = () -> { - if (pairBound) return mapper.apply(boundPair.getRight()); + if(pairBound) return mapper.apply(boundPair.getRight()); final NewRight rightVal = binder.apply(oldSupplier.get()).getRight(); @@ -166,7 +166,7 @@ public class HalfBoundLazyPair implements IPair MergedType merge(final BiFunction merger) { - if (!pairBound) { + if(!pairBound) { boundPair = binder.apply(oldSupplier.get()); pairBound = true; -- cgit v1.2.3