diff options
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 | 11 |
1 files changed, 11 insertions, 0 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 6290d5f..a4f4013 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/data/IHolder.java +++ b/BJC-Utils2/src/main/java/bjc/utils/data/IHolder.java @@ -56,4 +56,15 @@ public interface IHolder<T> { * @return The mapped value outside of a GenHolder */ public <E> E unwrap(Function<T, E> unwrapper); + + /** + * Bind the value in this holder to a new value + * + * @param <E> + * The new type of the held value + * @param binder + * The function to do the binding with + * @return The bound value + */ + public <E> IHolder<E> bind(Function<T, IHolder<E>> binder); }
\ No newline at end of file |
