diff options
| author | bculkin2442 <bjculkin@mix.wvu.edu> | 2016-02-29 10:41:17 -0500 |
|---|---|---|
| committer | bculkin2442 <bjculkin@mix.wvu.edu> | 2016-02-29 10:41:17 -0500 |
| commit | 82951e37e10b282d9a7c89f4662990b64949c943 (patch) | |
| tree | f84770bf755c4d187ef46e137082248c2709fed9 /BJC-Utils2/src/main/java/bjc/utils/data/IPair.java | |
| parent | 68faea64a4b1ef23acba209ad502e4458eb16290 (diff) | |
General code cleanup
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 | 15 |
1 files changed, 11 insertions, 4 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 9da7d22..fcf2b05 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/data/IPair.java +++ b/BJC-Utils2/src/main/java/bjc/utils/data/IPair.java @@ -16,7 +16,8 @@ public interface IPair<L, R> { * The function to apply to the right value. * @return A new pair containing the two modified values. */ - <L2, R2> IPair<L2, R2> apply(Function<L, L2> lf, Function<R, R2> rf); + public <L2, R2> IPair<L2, R2> apply(Function<L, L2> lf, + Function<R, R2> rf); /** * Collapse this pair to a single value. Does not change the internal @@ -26,8 +27,14 @@ public interface IPair<L, R> { * The function to use to collapse the pair. * @return The collapsed value. */ - <E> E merge(BiFunction<L, R, E> bf); - - void doWith(BiConsumer<L, R> bc); + public <E> E merge(BiFunction<L, R, E> bf); + /** + * Execute an action with the values of this pair. Has no effect on the + * internal contents + * + * @param bc + * The action to execute on the values + */ + public void doWith(BiConsumer<L, R> bc); }
\ No newline at end of file |
