@Test void newArrayClass() { int size = RandomUtils.nextInt(5, 20); ZonedDateTime[] result = ArrayUtil.newArray(ZonedDateTime.class, size); assertThat(result, arrayWithSize(size)); }
@SuppressWarnings("unchecked") public static <T> T[] newArray(Class<T> elementType, int size) { return (T[]) Array.newInstance(elementType, size); }
ArrayUtil extends UtilityClass { @SuppressWarnings("unchecked") public static <T> T[] newArray(Class<T> elementType, int size) { return (T[]) Array.newInstance(elementType, size); } }
ArrayUtil extends UtilityClass { @SuppressWarnings("unchecked") public static <T> T[] newArray(Class<T> elementType, int size) { return (T[]) Array.newInstance(elementType, size); }  }
ArrayUtil extends UtilityClass { @SuppressWarnings("unchecked") public static <T> T[] newArray(Class<T> elementType, int size) { return (T[]) Array.newInstance(elementType, size); }  @SuppressWarnings("unchecked") static T[] newArray(Class<T> elementType, int size); @SuppressWarnings("unchecked") static T[] newArray(TypeToken<T> elementType, int size); @SuppressWarnings("unchecked") static IntFunction<T[]> generator(Class<? super T> elementClass); @SuppressWarnings("unchecked") static IntFunction<T[]> generator(T prototype); @SuppressWarnings("unchecked") static T[] arrayOf(int size, T value); static char[] arrayOf(int size, char value); static boolean[] arrayOf(int size, boolean value); static byte[] arrayOf(int size, byte value); static short[] arrayOf(int size, short value); static int[] arrayOf(int size, int value); static long[] arrayOf(int size, long value); static float[] arrayOf(int size, float value); static double[] arrayOf(int size, double value); static Stream<Boolean> stream(boolean[] booleans); static Stream<Byte> stream(byte[] bytes); static Stream<Character> stream(char[] chars); static Stream<Short> stream(short[] shorts); static Stream<Float> stream(float[] floats); }
ArrayUtil extends UtilityClass { @SuppressWarnings("unchecked") public static <T> T[] newArray(Class<T> elementType, int size) { return (T[]) Array.newInstance(elementType, size); }  @SuppressWarnings("unchecked") static T[] newArray(Class<T> elementType, int size); @SuppressWarnings("unchecked") static T[] newArray(TypeToken<T> elementType, int size); @SuppressWarnings("unchecked") static IntFunction<T[]> generator(Class<? super T> elementClass); @SuppressWarnings("unchecked") static IntFunction<T[]> generator(T prototype); @SuppressWarnings("unchecked") static T[] arrayOf(int size, T value); static char[] arrayOf(int size, char value); static boolean[] arrayOf(int size, boolean value); static byte[] arrayOf(int size, byte value); static short[] arrayOf(int size, short value); static int[] arrayOf(int size, int value); static long[] arrayOf(int size, long value); static float[] arrayOf(int size, float value); static double[] arrayOf(int size, double value); static Stream<Boolean> stream(boolean[] booleans); static Stream<Byte> stream(byte[] bytes); static Stream<Character> stream(char[] chars); static Stream<Short> stream(short[] shorts); static Stream<Float> stream(float[] floats);  }