Skip to content
Snippets Groups Projects
Commit 7cf46a19 authored by Philippe Suter's avatar Philippe Suter
Browse files

Equals for Sets.

parent 3a27814d
Branches
No related tags found
No related merge requests found
...@@ -74,4 +74,12 @@ public final class Set { ...@@ -74,4 +74,12 @@ public final class Set {
} }
return new Set(n); return new Set(n);
} }
@Override
public boolean equals(Object that) {
if(that == this) return true;
if(!(that instanceof Set)) return false;
Set other = (Set)that;
return this.subsetOf(other) && other.subsetOf(this);
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment