warning suppression"The expression of type List needs unchecked .."



/**
	 * warning suppression
	 * "The expression of type List needs unchecked conversion to conform to List<?>"
	 * 
	 * @param <T>
	 * @param c
	 * @param clazz
	 * @return
	 */
	public static <T> List<T> castList(Collection<?> c, Class<? extends T> clazz) {
		List<T> r = new ArrayList<T>(c.size());
		for (Object o : c) {
			r.add(clazz.cast(o));
		}
		return r;
	}