Compares two Jids @param j @param compareResource @return
(Jid j, boolean compareResource)
| 73 | * @return |
| 74 | */ |
| 75 | public boolean equals(Jid j, boolean compareResource) { |
| 76 | if (j == null) { |
| 77 | return false; |
| 78 | } |
| 79 | |
| 80 | if (!getBare().equals(j.getBare())) { |
| 81 | return false; |
| 82 | } |
| 83 | |
| 84 | if (!compareResource) { |
| 85 | return true; |
| 86 | } |
| 87 | |
| 88 | return (resource.equals(j.resource)); |
| 89 | } |
| 90 | |
| 91 | |
| 92 | public String toString() { |
no test coverage detected