(Object other)
| 52 | } |
| 53 | |
| 54 | @Override |
| 55 | public boolean equals(Object other) { |
| 56 | if(other == null) { |
| 57 | return false; |
| 58 | } |
| 59 | |
| 60 | if(! (other instanceof Pair)) { |
| 61 | return false; |
| 62 | } |
| 63 | |
| 64 | Pair otherPair = (Pair) other; |
| 65 | |
| 66 | if(this.first == null) { |
| 67 | if(otherPair.first != null) { |
| 68 | return false; |
| 69 | } else { |
| 70 | return true; |
| 71 | } |
| 72 | } |
| 73 | |
| 74 | if(this.second == null) { |
| 75 | if(otherPair.second != null) { |
| 76 | return false; |
| 77 | } else { |
| 78 | return true; |
| 79 | } |
| 80 | } |
| 81 | |
| 82 | if(this.first.equals(otherPair.first) && this.second.equals(otherPair.second)) { |
| 83 | return true; |
| 84 | } else { |
| 85 | return false; |
| 86 | } |
| 87 | } |
| 88 | } |
no outgoing calls
no test coverage detected