diff options
| author | bculkin2442 <bjculkin@mix.wvu.edu> | 2016-04-13 16:54:12 -0400 |
|---|---|---|
| committer | bculkin2442 <bjculkin@mix.wvu.edu> | 2016-04-13 16:54:12 -0400 |
| commit | ba07771f8333f1b098ab8a9ec9fec886b72b9cc0 (patch) | |
| tree | 7d1326235d021cb4767065cddd25bbe9fbdf5ce1 /BJC-Utils2/src/main/java/bjc/utils/data/IPair.java | |
| parent | 12637af8d6b7b9b2d96deb89e5a09e05178a8e65 (diff) | |
Removed old data types
Diffstat (limited to 'BJC-Utils2/src/main/java/bjc/utils/data/IPair.java')
| -rw-r--r-- | BJC-Utils2/src/main/java/bjc/utils/data/IPair.java | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/BJC-Utils2/src/main/java/bjc/utils/data/IPair.java b/BJC-Utils2/src/main/java/bjc/utils/data/IPair.java deleted file mode 100644 index 98f425f..0000000 --- a/BJC-Utils2/src/main/java/bjc/utils/data/IPair.java +++ /dev/null @@ -1,54 +0,0 @@ -package bjc.utils.data; - -import java.util.function.BiConsumer; -import java.util.function.BiFunction; - -/** - * An interface representing a pair of values - * - * @author ben - * - * @param <L> - * The type stored in the left side of the pair - * @param <R> - * The type stored in the right side of the pair - */ -public interface IPair<L, R> { - /** - * Apply a function to the two internal values that returns a new pair. - * - * Is a monadic bind. - * - * @param <L2> - * The new left pair type - * @param <R2> - * The new right pair type - * @param binder - * The function to use as a bind - * @return The new pair - */ - public <L2, R2> IPair<L2, R2> bind( - BiFunction<L, R, IPair<L2, R2>> binder); - - /** - * Execute an action with the values of this pair. Has no effect on the - * internal contents - * - * @param action - * The action to execute on the values - */ - public void doWith(BiConsumer<L, R> action); - - /** - * Collapse this pair to a single value. Does not change the internal - * contents of this pair. - * - * @param <E> - * The resulting type after merging - * - * @param merger - * The function to use to collapse the pair. - * @return The collapsed value. - */ - public <E> E merge(BiFunction<L, R, E> merger); -}
\ No newline at end of file |
