File tree Expand file tree Collapse file tree
org.omg.sysml/src/org/omg/sysml/util/repository Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3232import java .util .stream .Collectors ;
3333import java .util .stream .Stream ;
3434
35+ import org .omg .sysml .StringUtil ;
3536import org .omg .sysml .lang .sysml .OwningMembership ;
3637import org .omg .sysml .model .Element ;
3738
@@ -239,6 +240,11 @@ public boolean equals(Object o) {
239240 return o == this || (o instanceof Map m && m .containsKey (ProjectRepository .ID_FIELD ) && idEquals (m ));
240241 }
241242
243+ @ Override
244+ public int hashCode () {
245+ return this .containsKey (ProjectRepository .ID_FIELD )? this .get (ProjectRepository .ID_FIELD ).hashCode (): super .hashCode ();
246+ }
247+
242248 private boolean idEquals (Map <?,?> other ) {
243249 UUID id = this .get (ProjectRepository .ID_FIELD );
244250 Object otherid = other .get (ProjectRepository .ID_FIELD );
You can’t perform that action at this time.
0 commit comments