android/guava/src/com/google/common/collect/Lists.java
@GwtIncompatible // CopyOnWriteArrayList
  public static <E> CopyOnWriteArrayList<E> newCopyOnWriteArrayList(
      Iterable<? extends E> elements) {
    // We copy elements to an ArrayList first, rather than incurring the
    // quadratic cost of adding them to the COWAL directly.
    Collection<? extends E> elementsCollection =
        (elements instanceof Collection) ? Collections2.cast(elements) : newArrayList(elements);
    return new CopyOnWriteArrayList<>(elementsCollection);
  }
@GwtIncompatible // CopyOnWriteArrayList
  public static <E> CopyOnWriteArrayList<E> newCopyOnWriteArrayList(
      Iterable<? extends E> elements) {
    // We copy elements to an ArrayList first, rather than incurring the
    // quadratic cost of adding them to the COWAL directly.
    Collection<? extends E> elementsCollection =
        (elements instanceof Collection) ? Collections2.cast(elements) : newArrayList(elements);
    return new CopyOnWriteArrayList<>(elementsCollection);
  }
Creates a {@code CopyOnWriteArrayList} instance containing the given elements.

@param elements the elements that the list should contain, in order
@return a new {@code CopyOnWriteArrayList} containing those elements
@since 12.0