code: private static <T> List<T> castList(List<?> list, Class<T> castTo) {
  		List<T> casted = new ArrayList<T>(list.size());
  		for (Object object : list) {
  			casted.add(castTo.cast(object));
  		}
  		return Collections.unmodifiableList(casted);
  	}
docs: Casts all objects in the given list to the given class, adding the casted
  objects to a new list.
  @param list the list to cast
  @param castTo the class to cast to
  @param <T> the class to cast to
  @return the new list (immutable)