summaryrefslogtreecommitdiff
path: root/BJC-Utils2/src/main/java/bjc/utils/data/IHolder.java
diff options
context:
space:
mode:
Diffstat (limited to 'BJC-Utils2/src/main/java/bjc/utils/data/IHolder.java')
-rw-r--r--BJC-Utils2/src/main/java/bjc/utils/data/IHolder.java24
1 files changed, 15 insertions, 9 deletions
diff --git a/BJC-Utils2/src/main/java/bjc/utils/data/IHolder.java b/BJC-Utils2/src/main/java/bjc/utils/data/IHolder.java
index ddcb2f6..3675842 100644
--- a/BJC-Utils2/src/main/java/bjc/utils/data/IHolder.java
+++ b/BJC-Utils2/src/main/java/bjc/utils/data/IHolder.java
@@ -15,8 +15,19 @@ import java.util.function.Function;
public interface IHolder<T> {
/**
+ * Call a provided function with the value being held
+ *
+ * @param f
+ * The function to call
+ */
+ public void doWith(Consumer<T> f);
+
+ /**
* Return the result of applying the given transformation to the held
- * value Doesn't change the held value
+ * value. Doesn't change the held value.
+ *
+ * @param <NewT>
+ * The new type of the held value
*
* @param f
* The transformation to apply
@@ -37,17 +48,12 @@ public interface IHolder<T> {
/**
* Returns a raw mapped value, not contained in a GenHolder
*
+ * @param <E>
+ * The type of the value that is the end result
+ *
* @param f
* The function to use for mapping the value
* @return The mapped value outside of a GenHolder
*/
public <E> E unwrap(Function<T, E> f);
-
- /**
- * Call a provided function with the value being held
- *
- * @param f
- * The function to call
- */
- public void doWith(Consumer<T> f);
} \ No newline at end of file