From 27bf571d6413c3cc6a5d664b5bddd38d21d7b1cd Mon Sep 17 00:00:00 2001 From: EVE Date: Mon, 13 Mar 2017 16:42:21 -0400 Subject: Formatting --- .../main/java/bjc/utils/data/SingleSupplier.java | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'BJC-Utils2/src/main/java/bjc/utils/data/SingleSupplier.java') diff --git a/BJC-Utils2/src/main/java/bjc/utils/data/SingleSupplier.java b/BJC-Utils2/src/main/java/bjc/utils/data/SingleSupplier.java index b5ff1e3..bf8b0a0 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/data/SingleSupplier.java +++ b/BJC-Utils2/src/main/java/bjc/utils/data/SingleSupplier.java @@ -5,31 +5,30 @@ import java.util.function.Supplier; /** * A supplier that can only supply one value. * - * Attempting to retrieve another value will cause an exception to be - * thrown. + * Attempting to retrieve another value will cause an exception to be thrown. * * @author ben * * @param */ public class SingleSupplier implements Supplier { - private static long nextID = 0; + private static long nextID = 0; - private Supplier source; + private Supplier source; - private boolean gotten; + private boolean gotten; - private long id; + private long id; // This is bad practice, but I want to know where the single // instantiation was, in case of duplicate initiations - private Exception instSite; + private Exception instSite; /** * Create a new single supplier from an existing value * * @param supp - * The supplier to give a single value from + * The supplier to give a single value from */ public SingleSupplier(Supplier supp) { source = supp; @@ -42,10 +41,8 @@ public class SingleSupplier implements Supplier { @Override public T get() { if (gotten == true) { - IllegalStateException isex = new IllegalStateException( - "Attempted to get value more than once" - + " from single supplier #" + id - + ". Previous instantiation below."); + IllegalStateException isex = new IllegalStateException("Attempted to get value more than once" + + " from single supplier #" + id + ". Previous instantiation below."); isex.initCause(instSite); -- cgit v1.2.3