Fix compare() for subset check (S.A ⊆ T.A) (#4978)

This commit is contained in:
Niklas Hoefflin
2023-12-07 17:06:56 +01:00
committed by GitHub
parent 249ee1dc99
commit 92131de377
2 changed files with 5 additions and 11 deletions

View File

@ -50,7 +50,7 @@ public class GSet<T> {
* @return true if the current G-Set is a subset of the other, false otherwise
*/
public boolean compare(GSet<T> other) {
return elements.containsAll(other.elements);
return other.elements.containsAll(elements);
}
/**