org.psjava.ds.map.SetEqualityTester Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of psjava Show documentation
Show all versions of psjava Show documentation
Problem Solving Library for Java
The newest version!
package org.psjava.ds.map;
import org.psjava.ds.set.Set;
public class SetEqualityTester {
public static boolean areEqual(Set m1, Set m2) {
if (m1.size() != m2.size())
return false;
for (V v : m1)
if (!m2.contains(v))
return false;
return true;
}
private SetEqualityTester() {
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy