docs: static <E> ImmutableList<E> asImmutableList(Object[] elements, int length) {
      switch (length) {
        case 0:
          return of();
        case 1:
          @SuppressWarnings("unchecked") // collection had only Es in it
          ImmutableList<E> list = new SingletonImmutableList<E>((E) elements[0]);
          return list;
        default:
          if (length < elements.length) {
            elements = arraysCopyOf(elements, length);
          }
          return new RegularImmutableList<E>(elements);
      }
    }