core/src/main/java/com/moparisthebest/mirror/convert/ElementFilter.java
private static <E extends Element, F extends E, C extends Collection<F>> C collectionFilter(C collection, Iterable<? extends E> elements, Class<F> clazz, ElementKind... kinds) {
		for (E e : elements) {
			ElementKind findKind = e.getKind();
			for (ElementKind kind : kinds)
				if (kind == findKind) {
					collection.add(clazz.cast(e));
					break;
				}
		}
		return collection;
	}
private static <E extends Element, F extends E, C extends Collection<F>> C collectionFilter(C collection, Iterable<? extends E> elements, Class<F> clazz, ElementKind... kinds) {
		for (E e : elements) {
			ElementKind findKind = e.getKind();
			for (ElementKind kind : kinds)
				if (kind == findKind) {
					collection.add(clazz.cast(e));
					break;
				}
		}
		return collection;
	}
private static < E extends Element , F extends E , C extends Collection < F > > C collectionFilter ( C collection , Iterable < ? extends E > elements , Class < F > clazz , ElementKind ... kinds ) { for ( E e : elements ) { ElementKind findKind = e . getKind ( ) ; for ( ElementKind kind : kinds ) if ( kind == findKind ) { collection . add ( clazz . cast ( e ) ) ; break ; } } return collection ; }
Assumes targetKinds and E are sensible.
Assumes targetKinds and E are sensible .