From 51825f93a1e7ba9ba739070a5cc5b69ad9e7ddd8 Mon Sep 17 00:00:00 2001 From: Ben Culkin Date: Fri, 25 Sep 2020 19:06:51 -0400 Subject: Warning cleanup --- src/main/java/bjc/data/internals/BoundLazy.java | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/bjc/data/internals/BoundLazy.java b/src/main/java/bjc/data/internals/BoundLazy.java index 9c984eb..a350a2b 100644 --- a/src/main/java/bjc/data/internals/BoundLazy.java +++ b/src/main/java/bjc/data/internals/BoundLazy.java @@ -13,8 +13,11 @@ import bjc.funcdata.IList; * Implements a lazy holder that has been bound. * * @author Ben Culkin + * @param + * The old type of the value. + * @param + * The type of the new bound value. */ -@SuppressWarnings("javadoc") public class BoundLazy implements IHolder { /* The old value. */ @@ -57,7 +60,10 @@ public class BoundLazy /* Prepare a list of pending actions. */ final IList> pendingActions = new FunctionalList<>(); - actions.forEach(pendingActions::add); + + for (UnaryOperator pendAct : actions) { + pendingActions.add(pendAct); + } /* Create the new supplier of a value. */ final Supplier> typeSupplier = () -> { @@ -69,7 +75,8 @@ public class BoundLazy } /* Apply all the pending actions. */ - return pendingActions.reduceAux(oldHolder, (action, state) -> state.transform(action), value -> value); + return pendingActions.reduceAux(oldHolder, + (action, state) -> state.transform(action), value -> value); }; return new BoundLazy<>(typeSupplier, bindr); @@ -95,7 +102,10 @@ public class BoundLazy /* Prepare a list of pending actions. */ final IList> pendingActions = new FunctionalList<>(); - actions.forEach(pendingActions::add); + + for (UnaryOperator pendAct : actions) { + pendingActions.add(pendAct); + } /* Prepare the new supplier. */ final Supplier typeSupplier = () -> { @@ -107,7 +117,8 @@ public class BoundLazy } /* Apply pending actions. */ - return pendingActions.reduceAux(oldHolder.getValue(), (action, state) -> action.apply(state), value -> mapper.apply(value)); + return pendingActions.reduceAux(oldHolder.getValue(), + (action, state) -> action.apply(state), value -> mapper.apply(value)); }; return new Lazy<>(typeSupplier); -- cgit v1.2.3