From 0a8f34c27c6ef93c5c94d17728af62c7607e225f Mon Sep 17 00:00:00 2001 From: Ben Culkin Date: Thu, 3 Dec 2020 19:21:38 -0500 Subject: Rename types to match Java style This renames several interfaces that had names like IWhatever, since that isn't a style that Java uses --- .../java/bjc/data/internals/HalfBoundLazyPair.java | 40 +++++++++++----------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'src/main/java/bjc/data/internals/HalfBoundLazyPair.java') diff --git a/src/main/java/bjc/data/internals/HalfBoundLazyPair.java b/src/main/java/bjc/data/internals/HalfBoundLazyPair.java index 6bcb6ae..849b973 100644 --- a/src/main/java/bjc/data/internals/HalfBoundLazyPair.java +++ b/src/main/java/bjc/data/internals/HalfBoundLazyPair.java @@ -4,8 +4,8 @@ import java.util.function.BiFunction; import java.util.function.Function; import java.util.function.Supplier; -import bjc.data.IHolder; -import bjc.data.IPair; +import bjc.data.Holder; +import bjc.data.Pair; import bjc.data.Identity; import bjc.data.LazyPair; @@ -24,15 +24,15 @@ import bjc.data.LazyPair; */ @SuppressWarnings("javadoc") public class HalfBoundLazyPair - implements IPair { + implements Pair { /* The supplier of the old value. */ private final Supplier oldSupplier; /* The function to transform the old value into a new pair. */ - private final Function> binder; + private final Function> binder; /* The new bound pair. */ - private IPair boundPair; + private Pair boundPair; /* Has the pair been bound yet or not? */ private boolean pairBound; @@ -46,16 +46,16 @@ public class HalfBoundLazyPair * The function to use to create the pair from the old value. */ public HalfBoundLazyPair(final Supplier oldSupp, - final Function> bindr) { + final Function> bindr) { oldSupplier = oldSupp; binder = bindr; } @Override - public IPair bind( - final BiFunction> bindr) { - final IHolder> newPair = new Identity<>(boundPair); - final IHolder newPairMade = new Identity<>(pairBound); + public Pair bind( + final BiFunction> bindr) { + final Holder> newPair = new Identity<>(boundPair); + final Holder newPairMade = new Identity<>(pairBound); final Supplier leftSupp = () -> { if (!newPairMade.getValue()) { @@ -81,10 +81,10 @@ public class HalfBoundLazyPair } @Override - public IPair - bindLeft(final Function> leftBinder) { + public Pair + bindLeft(final Function> leftBinder) { final Supplier leftSupp = () -> { - IPair newPair = boundPair; + Pair newPair = boundPair; if (!pairBound) { newPair = binder.apply(oldSupplier.get()); @@ -97,10 +97,10 @@ public class HalfBoundLazyPair } @Override - public IPair - bindRight(final Function> rightBinder) { + public Pair + bindRight(final Function> rightBinder) { final Supplier rightSupp = () -> { - IPair newPair = boundPair; + Pair newPair = boundPair; if (!pairBound) { newPair = binder.apply(oldSupplier.get()); @@ -114,8 +114,8 @@ public class HalfBoundLazyPair @Override public - IPair - combine(final IPair otherPair, + Pair + combine(final Pair otherPair, final BiFunction leftCombiner, final BiFunction rightCombiner) { return otherPair.bind((otherLeft, otherRight) -> bind((leftVal, rightVal) -> { @@ -127,7 +127,7 @@ public class HalfBoundLazyPair } @Override - public IPair + public Pair mapLeft(final Function mapper) { final Supplier leftSupp = () -> { if (pairBound) @@ -149,7 +149,7 @@ public class HalfBoundLazyPair } @Override - public IPair + public Pair mapRight(final Function mapper) { final Supplier leftSupp = () -> { if (pairBound) -- cgit v1.2.3