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 --- src/main/java/bjc/data/internals/BoundLazy.java | 38 ++++++++++++------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'src/main/java/bjc/data/internals/BoundLazy.java') diff --git a/src/main/java/bjc/data/internals/BoundLazy.java b/src/main/java/bjc/data/internals/BoundLazy.java index a350a2b..0e0e95c 100644 --- a/src/main/java/bjc/data/internals/BoundLazy.java +++ b/src/main/java/bjc/data/internals/BoundLazy.java @@ -4,10 +4,10 @@ import java.util.function.Function; import java.util.function.Supplier; import java.util.function.UnaryOperator; -import bjc.data.IHolder; +import bjc.data.Holder; import bjc.data.Lazy; import bjc.funcdata.FunctionalList; -import bjc.funcdata.IList; +import bjc.funcdata.ListEx; /** * Implements a lazy holder that has been bound. @@ -19,21 +19,21 @@ import bjc.funcdata.IList; * The type of the new bound value. */ public class BoundLazy - implements IHolder { + implements Holder { /* The old value. */ - private final Supplier> oldSupplier; + private final Supplier> oldSupplier; /* The function to use to transform the old value into a new value. */ - private final Function> binder; + private final Function> binder; /* The bound value being held. */ - private IHolder boundHolder; + private Holder boundHolder; /* Whether the bound value has been actualized or not. */ private boolean holderBound; /* Transformations currently pending on the bound value. */ - private final IList> actions + private final ListEx> actions = new FunctionalList<>(); /** @@ -45,20 +45,20 @@ public class BoundLazy * @param binder * The function to use to bind the old value to the new one. */ - public BoundLazy(final Supplier> supp, - final Function> binder) { + public BoundLazy(final Supplier> supp, + final Function> binder) { oldSupplier = supp; this.binder = binder; } @Override - public IHolder - bind(final Function> bindr) { + public Holder + bind(final Function> bindr) { if (bindr == null) throw new NullPointerException("Binder must not be null"); /* Prepare a list of pending actions. */ - final IList> pendingActions + final ListEx> pendingActions = new FunctionalList<>(); for (UnaryOperator pendAct : actions) { @@ -66,8 +66,8 @@ public class BoundLazy } /* Create the new supplier of a value. */ - final Supplier> typeSupplier = () -> { - IHolder oldHolder = boundHolder; + final Supplier> typeSupplier = () -> { + Holder oldHolder = boundHolder; /* Bind the value if it hasn't been bound before. */ if (!holderBound) { @@ -83,7 +83,7 @@ public class BoundLazy } @Override - public Function> + public Function> lift(final Function func) { if (func == null) throw new NullPointerException("Function to lift must not be null"); @@ -94,13 +94,13 @@ public class BoundLazy } @Override - public IHolder + public Holder map(final Function mapper) { if (mapper == null) throw new NullPointerException("Mapper must not be null"); /* Prepare a list of pending actions. */ - final IList> pendingActions + final ListEx> pendingActions = new FunctionalList<>(); for (UnaryOperator pendAct : actions) { @@ -109,7 +109,7 @@ public class BoundLazy /* Prepare the new supplier. */ final Supplier typeSupplier = () -> { - IHolder oldHolder = boundHolder; + Holder oldHolder = boundHolder; /* Bound the value if it hasn't been bound. */ if (!holderBound) { @@ -133,7 +133,7 @@ public class BoundLazy } @Override - public IHolder + public Holder transform(final UnaryOperator transformer) { if (transformer == null) throw new NullPointerException("Transformer must not be null"); -- cgit v1.2.3