code: @SuppressWarnings("unchecked")
  	public static <T,S> T[] toArray(Class<T> type, Collection<S> src) {
  		T[] dest = (T[]) Array.newInstance(type, src.size());
  		int i = 0;
  		for(S s : src) {
  			dest[i++] = (T) s;
  		}
  		return dest;
  	}
docs: Convert from an array of one kind to an array of another kind.
  
  @param type
  @param src
  @return