net.onedaybeard.ecs.util.CollectionsUtil Maven / Gradle / Ivy
package net.onedaybeard.ecs.util;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
public final class CollectionsUtil {
private CollectionsUtil() {}
public static Set> filter(Collection> source, String packageFilter) {
Set> filtered = new HashSet>();
for (Class extends T> klazz : source) {
if (klazz.getName().startsWith(packageFilter))
filtered.add(klazz);
}
return filtered;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy