summaryrefslogtreecommitdiff
path: root/base/src/main/java/bjc/utils/data/Pair.java
diff options
context:
space:
mode:
Diffstat (limited to 'base/src/main/java/bjc/utils/data/Pair.java')
-rw-r--r--base/src/main/java/bjc/utils/data/Pair.java25
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);