public static <T> T[] createArray(int size, T defaultValue) {
		T[] result = (T[]) GenericReflection.newArray(defaultValue.getClass(), size);
		for (int i = 0; i < result.length; i++) {
			result[i] = defaultValue;
		}
		return result;
	}
public static < T > T [ ] createArray ( int size , T defaultValue ) { T [ ] result = ( T [ ] ) GenericReflection . newArray ( defaultValue . getClass ( ) , size ) ; for ( int i = 0 ; i < result . length ; i ++ ) { result [ i ] = defaultValue ; } return result ; }
Returns a new array with the given size containing the default value at
each index.

@param <T>
Array type.
@param size
The desired size of the array.
@param defaultValue
The default value to use
@return The created array