summaryrefslogtreecommitdiff
path: root/BJC-Utils2/src/main/java/bjc/utils/data/IPair.java
diff options
context:
space:
mode:
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