diff options
| author | Benjamin J. Culkin <bjculkin@mix.wvu.edu> | 2017-10-11 13:41:07 -0300 |
|---|---|---|
| committer | Benjamin J. Culkin <bjculkin@mix.wvu.edu> | 2017-10-11 13:41:07 -0300 |
| commit | 946cab444bc301d8a7c756a1bab039558288de89 (patch) | |
| tree | 419f27c39a509bcd83cae0e6630be8eb7ff95a30 /base/src/main/java/bjc/utils/data/Pair.java | |
| parent | c82e3b3b2de0633317ec8fc85925e91422820597 (diff) | |
Cleanup work
Diffstat (limited to 'base/src/main/java/bjc/utils/data/Pair.java')
| -rw-r--r-- | base/src/main/java/bjc/utils/data/Pair.java | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/base/src/main/java/bjc/utils/data/Pair.java b/base/src/main/java/bjc/utils/data/Pair.java index e6796ba..fb81e17 100644 --- a/base/src/main/java/bjc/utils/data/Pair.java +++ b/base/src/main/java/bjc/utils/data/Pair.java @@ -9,34 +9,33 @@ import java.util.function.Function; * @author ben * * @param <LeftType> - * The type of the left value + * The type of the left value. + * * @param <RightType> - * The type of the right value + * The type of the right value. */ public class Pair<LeftType, RightType> implements IPair<LeftType, RightType> { - // The left value + /* The left value. */ private LeftType leftValue; - - // The right value + /* The right value. */ private RightType rightValue; - /** - * Create a new pair with both sides set to null - */ + /** Create a new pair with both sides set to null. */ public Pair() { } /** - * Create a new pair with both sides set to the specified values + * Create a new pair with both sides set to the specified values. * * @param left - * The value of the left side + * The value of the left side. + * * @param right - * The value of the right side + * The value of the right side. */ public Pair(final LeftType left, final RightType right) { - leftValue = left; + leftValue = left; rightValue = right; } @@ -70,7 +69,7 @@ public class Pair<LeftType, RightType> implements IPair<LeftType, RightType> { final BiFunction<LeftType, OtherLeft, CombinedLeft> leftCombiner, final BiFunction<RightType, OtherRight, CombinedRight> rightCombiner) { return otherPair.bind((otherLeft, otherRight) -> { - final CombinedLeft left = leftCombiner.apply(leftValue, otherLeft); + final CombinedLeft left = leftCombiner.apply(leftValue, otherLeft); final CombinedRight right = rightCombiner.apply(rightValue, otherRight); return new Pair<>(left, right); |
