summaryrefslogtreecommitdiff
path: root/BJC-Utils2/src/main/java/bjc/utils/data/SingleSupplier.java
diff options
context:
space:
mode:
Diffstat (limited to 'BJC-Utils2/src/main/java/bjc/utils/data/SingleSupplier.java')
-rw-r--r--BJC-Utils2/src/main/java/bjc/utils/data/SingleSupplier.java10
1 files changed, 5 insertions, 5 deletions
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 bf8b0a0..76c9be2 100644
--- a/BJC-Utils2/src/main/java/bjc/utils/data/SingleSupplier.java
+++ b/BJC-Utils2/src/main/java/bjc/utils/data/SingleSupplier.java
@@ -4,9 +4,9 @@ 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.
- *
+ *
* @author ben
*
* @param <T>
@@ -26,7 +26,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
*/
@@ -40,7 +40,7 @@ public class SingleSupplier<T> implements Supplier<T> {
@Override
public T get() {
- if (gotten == true) {
+ if(gotten == true) {
IllegalStateException isex = new IllegalStateException("Attempted to get value more than once"
+ " from single supplier #" + id + ". Previous instantiation below.");
@@ -53,7 +53,7 @@ public class SingleSupplier<T> implements Supplier<T> {
try {
throw new IllegalStateException("Previous instantiation here.");
- } catch (IllegalStateException isex) {
+ } catch(IllegalStateException isex) {
instSite = isex;
}