diff --git a/src/main/java/org/apache/commons/lang3/tuple/MutablePair.java b/src/main/java/org/apache/commons/lang3/tuple/MutablePair.java index 3a0389981..adde19e2e 100644 --- a/src/main/java/org/apache/commons/lang3/tuple/MutablePair.java +++ b/src/main/java/org/apache/commons/lang3/tuple/MutablePair.java @@ -86,7 +86,7 @@ public class MutablePair extends Pair { * * @param left the new value of the left element, may be null */ - public void setLeftElement(L left) { + public void setLeft(L left) { this.left = left; } @@ -103,7 +103,7 @@ public class MutablePair extends Pair { * * @param right the value of the right element */ - public void setRightElement(R right) { + public void setRight(R right) { this.right = right; } @@ -116,7 +116,7 @@ public class MutablePair extends Pair { */ public R setValue(R value) { R result = getRight(); - setRightElement(value); + setRight(value); return result; } diff --git a/src/test/java/org/apache/commons/lang3/tuple/MutablePairTest.java b/src/test/java/org/apache/commons/lang3/tuple/MutablePairTest.java index ffb8ed992..ef1f72c15 100644 --- a/src/test/java/org/apache/commons/lang3/tuple/MutablePairTest.java +++ b/src/test/java/org/apache/commons/lang3/tuple/MutablePairTest.java @@ -54,8 +54,8 @@ public class MutablePairTest { @Test public void testMutate() throws Exception { MutablePair pair = new MutablePair(0, "foo"); - pair.setLeftElement(42); - pair.setRightElement("bar"); + pair.setLeft(42); + pair.setRight("bar"); assertEquals(42, pair.getLeft().intValue()); assertEquals("bar", pair.getRight()); }