@SuppressWarnings("unchecked")
  protected void _initializeWithCollection(Collection<? extends E> collection, NullHandling nullHandling) {
    if (collection == null) {
      _initializeListWithCapacity(0);
      return;
    }
    if (collection instanceof List) {
      _initializeWithList((List<E>) collection, new NSRange(0, collection.size()), nullHandling, !NoCopy);
    } else {
      List<E> store = _initializeListWithCapacity(collection.size());
      if (nullHandling == NullHandling.NoCheck || collection instanceof _NSFoundationCollection) {
        store.addAll(collection);
        return;
      }
      for (E element : collection) {
        if (element == null) {
          if (nullHandling == NullHandling.CheckAndFail)
            throw new IllegalArgumentException(NULL_NOT_ALLOWED);
          continue;
        }
        store.add(element);
      }
    }
  }