File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed
perun-base/src/main/java/cz/metacentrum/perun/core/api Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -132,4 +132,44 @@ public String toString() {
132132 + attrNew ).append ("', additionalUserExtSources='" ).append (additionalUserExtSources ).append ("']" ).toString ();
133133 }
134134
135+ @ Override
136+ public int hashCode () {
137+ final int prime = 31 ;
138+ int result = 1 ;
139+ result = prime * result
140+ + ((attributes == null ) ? 0 : attributes .hashCode ());
141+ result = prime * result
142+ + ((userExtSource == null ) ? 0 : userExtSource .hashCode ());
143+ return result ;
144+ }
145+
146+ @ Override
147+ public boolean equals (Object obj ) {
148+ if (this == obj ) {
149+ return true ;
150+ }
151+ if (obj == null ) {
152+ return false ;
153+ }
154+ if (getClass () != obj .getClass ()) {
155+ return false ;
156+ }
157+ Candidate other = (Candidate ) obj ;
158+ if (attributes == null ) {
159+ if (other .attributes != null ) {
160+ return false ;
161+ }
162+ } else if (!attributes .equals (other .attributes )) {
163+ return false ;
164+ }
165+ if (userExtSource == null ) {
166+ if (other .userExtSource != null ) {
167+ return false ;
168+ }
169+ } else if (!userExtSource .equals (other .userExtSource )) {
170+ return false ;
171+ }
172+ return true ;
173+ }
174+
135175}
You can’t perform that action at this time.
0 commit comments