All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.onedaybeard.ecs.util.CollectionsUtil Maven / Gradle / Ivy

There is a newer version: 0.2.0
Show newest version
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 klazz : source) {
			if (klazz.getName().startsWith(packageFilter))
				filtered.add(klazz);
		}
		return filtered;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy