code: @Nonnull
    @ReturnsMutableCopy
    public static <ELEMENTTYPE> ELEMENTTYPE [] newArray (@Nullable final Collection <? extends ELEMENTTYPE> aCollection,
                                                         @Nonnull final Class <ELEMENTTYPE> aClass)
    {
      ValueEnforcer.notNull (aClass, "class");
  
      if (CollectionHelper.isEmpty (aCollection))
        return newArray (aClass, 0);
  
      final ELEMENTTYPE [] ret = newArray (aClass, aCollection.size ());
      return aCollection.toArray (ret);
    }
docs: Create a new array with the elements in the passed collection..
  
  @param <ELEMENTTYPE>
  Type of element
  @param aCollection
  The collection to be converted to an array. May be <code>null</code>
  .
  @param aClass
  The class of the elements inside the collection. May not be
  <code>null</code>.
  @return <code>null</code> if the passed collection is empty, a non-
  <code>null</code> array with all elements of the collection
  otherwise.