summaryrefslogtreecommitdiff
path: root/BJC-Utils2/src/main/java/bjc/utils/data/IPair.java
diff options
context:
space:
mode:
authorbculkin2442 <bjculkin@mix.wvu.edu>2016-04-11 21:54:44 -0400
committerbculkin2442 <bjculkin@mix.wvu.edu>2016-04-11 21:54:44 -0400
commitc8a00b789671d59589bcb5520c1e9d208bcc27f6 (patch)
tree6b64e3c78f56d025c78ab08a9edc038af0b6e821 /BJC-Utils2/src/main/java/bjc/utils/data/IPair.java
parenta716a7a53f85a6901128896da508d31c172011b4 (diff)
Work on restructing data.
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.java26
1 files changed, 3 insertions, 23 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
index a20ff36..98f425f 100644
--- a/BJC-Utils2/src/main/java/bjc/utils/data/IPair.java
+++ b/BJC-Utils2/src/main/java/bjc/utils/data/IPair.java
@@ -2,7 +2,6 @@ package bjc.utils.data;
import java.util.function.BiConsumer;
import java.util.function.BiFunction;
-import java.util.function.Function;
/**
* An interface representing a pair of values
@@ -14,26 +13,7 @@ import java.util.function.Function;
* @param <R>
* The type stored in the right side of the pair
*/
-public interface IPair<L, R> {
-
- /**
- * Create a new pair by applying the given functions to the left/right.
- * Does not change the internal contents of this pair.
- *
- * @param <L2>
- * The new left type of the pair
- * @param <R2>
- * The new right type of the pair
- *
- * @param leftTransformer
- * The function to apply to the left value.
- * @param rightTransformer
- * The function to apply to the right value.
- * @return A new pair containing the two modified values.
- */
- public <L2, R2> IPair<L2, R2> apply(Function<L, L2> leftTransformer,
- Function<R, R2> rightTransformer);
-
+public interface IPair<L, R> {
/**
* Apply a function to the two internal values that returns a new pair.
*
@@ -47,8 +27,8 @@ public interface IPair<L, R> {
* 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);
+ 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