Skip to content

Commit 23f0816

Browse files
committed
Javadoc
1 parent f480345 commit 23f0816

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/main/java/org/apache/commons/lang3/tuple/Pair.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,9 +228,11 @@ public R getValue() {
228228

229229
/**
230230
* Returns a suitable hash code.
231+
* <p>
231232
* The hash code follows the definition in {@code Map.Entry}.
233+
* </p>
232234
*
233-
* @return the hash code
235+
* @return the hash code.
234236
*/
235237
@Override
236238
public int hashCode() {

src/main/java/org/apache/commons/lang3/tuple/Triple.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,11 +168,15 @@ public boolean equals(final Object obj) {
168168

169169
/**
170170
* Returns a suitable hash code.
171+
* <p>
172+
* The hash code is adapted from the definition in {@code Map.Entry}.
173+
* </p>
171174
*
172-
* @return the hash code
175+
* @return the hash code.
173176
*/
174177
@Override
175178
public int hashCode() {
179+
// See Map.Entry API specification
176180
return Objects.hashCode(getLeft()) ^ Objects.hashCode(getMiddle()) ^ Objects.hashCode(getRight());
177181
}
178182

0 commit comments

Comments
 (0)