@SuppressWarnings("unchecked")
    public static <E> ArrayList<E> newArrayList(final E... elements) {
        Requires.requireNonNull(elements, "elements");
        // Avoid integer overflow when a large array is passed in
        final int capacity = computeArrayListCapacity(elements.length);
        final ArrayList<E> list = new ArrayList<>(capacity);
        Collections.addAll(list, elements);
        return list;
    }
Creates a mutable {@code ArrayList} instance containing the given elements.
jraft-rheakv/rheakv-core/src/main/java/com/alipay/sofa/jraft/rhea/util/Lists.java