diff options
| author | bculkin2442 <bjculkin@mix.wvu.edu> | 2016-03-22 12:28:35 -0400 |
|---|---|---|
| committer | bculkin2442 <bjculkin@mix.wvu.edu> | 2016-03-22 12:28:35 -0400 |
| commit | 01cb9f504c860bc1c037a44f3a76bf342a293d46 (patch) | |
| tree | 02d1d34de0828159bbda93e881c93a6b45720f32 /BJC-Utils2/src/main/java/bjc/utils/data/IHolder.java | |
| parent | 4685955a62c430007c5c8ed2b915ffc618d30aca (diff) | |
General formatting cleanup and documentation update
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.java | 24 |
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 |
