code: @Nonnull
      public static <A> ImmutableList<A> from(@Nonnull List<A> arrayList) {
          // Manual expansion of tail recursion.
          ImmutableList<A> l = empty();
          int size = arrayList.size();
          for (int i = size - 1; i >= 0; i--) {
              l = cons(arrayList.get(i), l);
          }
          return l;
      /* TODO: use Collection here if it doesn't incur performance penalties
      ImmutableList<A> list = empty();
      int size = collection.size();
      for (A element : collection) {
        list = cons(element, list);
      }
      return list;
       */
      }
docs: Creating List from.
  
  @param arrayList The {@link java.util.ArrayList} to construct the {@link ImmutableList}
  from.
  @param <A>       The type of the elements of the list.
  @return a new {@link ImmutableList} that is comprised of all the elements in the {@link
  java.util.ArrayList}.