Skip to content

Commit e97ad8a

Browse files
committed
Addressing reviewer's comments
1 parent 7d49518 commit e97ad8a

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

  • biojava-structure/src/main/java/org/biojava/nbio/structure/align/client

biojava-structure/src/main/java/org/biojava/nbio/structure/align/client/PdbPair.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
/**
2828
* A pair for structure alignment.
29-
* a pair is considered equal to another pair if their two poles are equal regardless to their order.
29+
* a pair is considered equal to another pair if their two respective tuple poles are equal either in their original or reversed order.
3030
* i.e. both <code>new PdbPair("1abc", "2abc").equals(new PdbPair("1abc", "2abc"))</code> and
3131
* <code>new PdbPair("1abc", "2abc").equals(new PdbPair("2abc", "1abc"))</code> are <code>true</code>.
3232
* @author Andreas Prlic
@@ -67,9 +67,7 @@ public String toString() {
6767

6868
@Override
6969
public int hashCode() {
70-
final int prime = 31;
71-
return prime * name1.hashCode() +
72-
prime * name2.hashCode();
70+
return Objects.hashCode(name1) + Objects.hashCode(name2);
7371
}
7472

7573
@Override

0 commit comments

Comments
 (0)