summaryrefslogtreecommitdiff
path: root/base/src/main/java/bjc/utils/data/SingleSupplier.java
diff options
context:
space:
mode:
Diffstat (limited to 'base/src/main/java/bjc/utils/data/SingleSupplier.java')
-rw-r--r--base/src/main/java/bjc/utils/data/SingleSupplier.java15
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;
}