From ba07771f8333f1b098ab8a9ec9fec886b72b9cc0 Mon Sep 17 00:00:00 2001 From: bculkin2442 Date: Wed, 13 Apr 2016 16:54:12 -0400 Subject: Removed old data types --- .../src/main/java/bjc/utils/data/IHolder.java | 70 ---------------------- 1 file changed, 70 deletions(-) delete mode 100644 BJC-Utils2/src/main/java/bjc/utils/data/IHolder.java (limited to 'BJC-Utils2/src/main/java/bjc/utils/data/IHolder.java') diff --git a/BJC-Utils2/src/main/java/bjc/utils/data/IHolder.java b/BJC-Utils2/src/main/java/bjc/utils/data/IHolder.java deleted file mode 100644 index a4f4013..0000000 --- a/BJC-Utils2/src/main/java/bjc/utils/data/IHolder.java +++ /dev/null @@ -1,70 +0,0 @@ -package bjc.utils.data; - -import java.util.function.Consumer; -import java.util.function.Function; - -/** - * Generic interface for things that store a single value in a roughly - * monadic fashion - * - * @author ben - * - * @param - * The type of data being stored - */ -public interface IHolder { - - /** - * Call a provided function with the value being held - * - * @param action - * The function to call - */ - public void doWith(Consumer action); - - /** - * Return the result of applying the given transformation to the held - * value. Doesn't change the held value. - * - * @param - * The new type of the held value - * - * @param transformer - * The transformation to apply - * @return A holder with the transformed value - */ - public IHolder map(Function transformer); - - /** - * Apply the given transformation to the held value. Returns the holder - * for allowing chaining of transforms - * - * @param transformer - * The transform to apply to the value - * @return The holder - */ - public IHolder transform(Function transformer); - - /** - * Returns a raw mapped value, not contained in a GenHolder - * - * @param - * The type of the value that is the end result - * - * @param unwrapper - * The function to use for mapping the value - * @return The mapped value outside of a GenHolder - */ - public E unwrap(Function unwrapper); - - /** - * Bind the value in this holder to a new value - * - * @param - * The new type of the held value - * @param binder - * The function to do the binding with - * @return The bound value - */ - public IHolder bind(Function> binder); -} \ No newline at end of file -- cgit v1.2.3