File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed
src/main/java/com/jcabi/urn Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change 1111import java .net .URISyntaxException ;
1212import java .net .URLDecoder ;
1313import java .util .Map ;
14+ import java .util .Objects ;
1415import java .util .TreeMap ;
15- import lombok .EqualsAndHashCode ;
1616import org .apache .commons .lang3 .StringUtils ;
1717
1818/**
3434 * @checkstyle AbbreviationAsWordInNameCheck (500 lines)
3535 */
3636@ Immutable
37- @ EqualsAndHashCode
3837@ SuppressWarnings ({
3938 "PMD.TooManyMethods" , "PMD.UseConcurrentHashMap" , "PMD.GodClass" ,
4039 "PMD.OnlyOneConstructorShouldDoInitialization"
@@ -153,6 +152,24 @@ public String toString() {
153152 return this .uri ;
154153 }
155154
155+ @ Override
156+ public boolean equals (final Object obj ) {
157+ final boolean result ;
158+ if (this == obj ) {
159+ result = true ;
160+ } else if (obj instanceof URN ) {
161+ result = Objects .equals (this .uri , ((URN ) obj ).uri );
162+ } else {
163+ result = false ;
164+ }
165+ return result ;
166+ }
167+
168+ @ Override
169+ public int hashCode () {
170+ return Objects .hashCode (this .uri );
171+ }
172+
156173 @ Override
157174 public int compareTo (final URN urn ) {
158175 return this .uri .compareTo (urn .uri );
You can’t perform that action at this time.
0 commit comments