code: public static <E> List<E> copyOf(E[] elements) {
      Preconditions.checkNotNull(elements, "elements");
      List<E> result = new ArrayList<>(elements.length);
      Collections.addAll(result, elements);
      return Collections.unmodifiableList(result);
    }
docs: Returns an unmodifiable view of the list composed of elements.
  
  @param elements Array of elements.
  @param <E>      Type of the elements of the list.
  @return an unmodifiable view of the list composed of elements.