package waymaker.gen; // Copyright © 2015 Michael Allan. Licence MIT. -*-javaM-*- /** More utilities for working with arrays. * * @see java.util.Arrays */ public @ThreadSafe final class ArraysX { private ArraysX() {} // /** Constructs a generically typed array. This is a convenience method. // */ // public static @SuppressWarnings("unchecked") E[] newArray( final int size ) // { // final Object[] newArray; // if( size == 0 ) newArray = ObjectX.EMPTY_OBJECT_ARRAY; // spare the garbage collector // else newArray = new Object[size]; // return (E[])newArray; // } /// will fail with ClassCastException; see the comment CollectionsX.toArray }