diff options
| author | bjculkin <bjculkin@mix.wvu.edu> | 2018-02-12 22:45:04 -0500 |
|---|---|---|
| committer | bjculkin <bjculkin@mix.wvu.edu> | 2018-02-12 22:45:04 -0500 |
| commit | df94066e3af02ff02d5ab4d033a3d603f743234c (patch) | |
| tree | 168a1edaf58d386c175ffb601e9d4da8e13d31e2 /base/src/main/java/bjc/utils/data/SingleSupplier.java | |
| parent | ae51c587c53f7ca311e556e3cbd0c5566d6c2843 (diff) | |
Formatting pass
Diffstat (limited to 'base/src/main/java/bjc/utils/data/SingleSupplier.java')
| -rw-r--r-- | base/src/main/java/bjc/utils/data/SingleSupplier.java | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/base/src/main/java/bjc/utils/data/SingleSupplier.java b/base/src/main/java/bjc/utils/data/SingleSupplier.java index 60f9136..8054d33 100644 --- a/base/src/main/java/bjc/utils/data/SingleSupplier.java +++ b/base/src/main/java/bjc/utils/data/SingleSupplier.java @@ -10,7 +10,7 @@ import java.util.function.Supplier; * @author ben * * @param <T> - * The supplied type + * The supplied type */ public class SingleSupplier<T> implements Supplier<T> { /* The next supplier ID. */ @@ -25,10 +25,9 @@ public class SingleSupplier<T> implements Supplier<T> { /* * The place where the supplier was instantiated. * - * @NOTE - * This is both slow to create, and generally bad practice to keep - * exceptions around without throwing them. However, it is very - * useful to find where the first instantiation was. + * @NOTE This is both slow to create, and generally bad practice to keep + * exceptions around without throwing them. However, it is very useful + * to find where the first instantiation was. */ private Exception instSite; @@ -36,7 +35,7 @@ public class SingleSupplier<T> implements Supplier<T> { * 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(final Supplier<T> supp) { source = supp; @@ -48,7 +47,7 @@ public class SingleSupplier<T> implements Supplier<T> { @Override public T get() { - if (gotten == true) { + if(gotten == true) { final String msg = String.format( "Attempted to retrieve value more than once from single supplier #%d", id); @@ -63,7 +62,7 @@ public class SingleSupplier<T> implements Supplier<T> { try { throw new IllegalStateException("Previous instantiation here."); - } catch (final IllegalStateException isex) { + } catch(final IllegalStateException isex) { instSite = isex; } |
