From 98cdf435d4974f4cca8f7b4eb4026da2c88cbc4c Mon Sep 17 00:00:00 2001 From: bculkin2442 Date: Sun, 26 Mar 2017 11:30:43 -0400 Subject: Update --- .../java/bjc/utils/data/internals/BoundLazy.java | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'BJC-Utils2/src/main/java/bjc/utils/data/internals/BoundLazy.java') diff --git a/BJC-Utils2/src/main/java/bjc/utils/data/internals/BoundLazy.java b/BJC-Utils2/src/main/java/bjc/utils/data/internals/BoundLazy.java index 0ec69f0..cc1c0c0 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/data/internals/BoundLazy.java +++ b/BJC-Utils2/src/main/java/bjc/utils/data/internals/BoundLazy.java @@ -9,9 +9,10 @@ import java.util.function.Function; import java.util.function.Supplier; import java.util.function.UnaryOperator; -/** +/* * Implements a lazy holder that has been bound */ +@SuppressWarnings("javadoc") public class BoundLazy implements IHolder { /* * The old value @@ -48,7 +49,7 @@ public class BoundLazy implements IHolder IHolder bind(Function> bindr) { - if(bindr == null) throw new NullPointerException("Binder must not be null"); + if (bindr == null) throw new NullPointerException("Binder must not be null"); /* * Prepare a list of pending actions @@ -65,7 +66,7 @@ public class BoundLazy implements IHolder implements IHolder Function> lift( Function func) { - if(func == null) throw new NullPointerException("Function to lift must not be null"); + if (func == null) throw new NullPointerException("Function to lift must not be null"); return (val) -> { return new Lazy<>(func.apply(val)); @@ -92,7 +93,7 @@ public class BoundLazy implements IHolder IHolder map(Function mapper) { - if(mapper == null) throw new NullPointerException("Mapper must not be null"); + if (mapper == null) throw new NullPointerException("Mapper must not be null"); // Prepare a list of pending actions IList> pendingActions = new FunctionalList<>(); @@ -103,7 +104,7 @@ public class BoundLazy implements IHolder oldHolder = boundHolder; // Bound the value if it hasn't been bound - if(!holderBound) { + if (!holderBound) { oldHolder = oldSupplier.get().unwrap(binder); } @@ -117,14 +118,14 @@ public class BoundLazy implements IHolder transform(UnaryOperator transformer) { - if(transformer == null) throw new NullPointerException("Transformer must not be null"); + if (transformer == null) throw new NullPointerException("Transformer must not be null"); actions.add(transformer); @@ -133,9 +134,9 @@ public class BoundLazy implements IHolder UnwrappedType unwrap(Function unwrapper) { - if(unwrapper == null) throw new NullPointerException("Unwrapper must not be null"); + if (unwrapper == null) throw new NullPointerException("Unwrapper must not be null"); - if(!holderBound) { + if (!holderBound) { boundHolder = oldSupplier.get().unwrap(binder::apply); } -- cgit v1.2.3