添加许多元素
@param collection
338661
public MaxHeap<E> addAll(Collection<E> collection)
    {
        for (E e : collection)
        {
            add(e);
        }

        return this;
    }
528630
function( model ) {
			var modelColl = model.collection;
			var coll = this.getCollection( model );
			coll && coll._add( model );
			model.collection = modelColl;
		}
862153
public static <T extends CharSequence> Collection<T> removeEmpty(Collection<T> collection) {
		return filter(collection, new Filter<T>() {
			@Override
			public boolean accept(T t) {
				return false == StrUtil.isEmpty(t);
			}
		});
	}
926613
public static Object getElementFromCollection(Collection<Object> collection, int index) {
    if (collection.size() < index + 1)
      return null;

    if (collection instanceof List)
      return ((List<Object>) collection).get(index);

    Iterator<Object> iterator = collection.iterator();
    for (int i = 0; i < index; i++) {
      iterator.next();
    }
    return iterator.next();
  }
644447
public Packer putStringCollection(final Collection<String> collection) {
		putVInt(collection.size());
		for (final String value : collection) {
			putString(value);
		}
		return this;
	}
454512
public static void addAll(Collection<Object> list, Object[] objects)
	{
		list.addAll(Arrays.asList(objects));
	}
485617
public void addElements(
                    final Collection<? extends T> elements
                    )
    {
        if (elements == null  ||  elements.size() == 0) {
            return;
        }

        for (T  obj : elements) {
            addElement( obj );
        }
    }
1102442
public void addFalsePositive(Collection<Key> coll) {
    if (coll == null) {
      throw new NullPointerException("Collection<Key> can not be null");
    }
    
    for (Key k : coll) {
      addFalsePositive(k);
    }
  }
1138956
public static <T> Collection<T> addAll(Collection<T> collection, Iterable<T> iterable) {
		return addAll(collection, iterable.iterator());
	}
127681
public boolean addAll(Collection<T> items)
	{
		boolean wasAllAdded = true;
		for (T item : items)
		{
			if(!add(item))
				wasAllAdded = false;
		}
		
		return wasAllAdded;
	}
801418
public static void writeCollection(XMLOutput xmlOutput, Collection<? extends XMLWriteable> collection) throws IOException {
        for (XMLWriteable obj : collection) {
            obj.writeXML(xmlOutput);
        }
    }
403439
function listenCollection(collection, listener) {
    collection.forEach(function listenModel(model) {
        listen(model, listener);
    });

    collection.on('add', function onAdd(model) {
        listen(model, listener);
        listener();
    });
}
321700
function Collection(nodes) {
  this.length = 0;
  if (nodes) {
    nodes = unique(nodes);
    this.length = nodes.length;
    // add each node to an index-based property on collection, in order to
    // appear "array"-like
    for (var i = 0, len = nodes.length; i < len; i++) {
      this[i] = nodes[i];
    }
  }
}
185413
public static <T> Function<T, Void> addTo(final Collection<T> collection) {
        return new Function<T, Void>() {
            public Void apply(T arg) {
                collection.add(arg);
                return null;
            }
        };
    }
586603
public function addCollection(self $collection)
    {
        $this->requirements = array_merge($this->requirements, $collection->all());
    }
523393
@Override
    public boolean addAll(@NonNull Collection<? extends E> collection) {
        final int size = collection.size();
        if (size > maxSize) {
            collection = new ArrayList<>(collection).subList(size - maxSize, size);
        }
        final int overhead = size() + collection.size() - maxSize;
        if (overhead > 0) {
            removeRange(0, overhead);
        }
        return super.addAll(collection);
    }
287535
@SuppressWarnings({"unchecked", "ManualArrayToCollectionCopy"})
    public static <E, T extends E> Collection<E> addAll(Collection<E> c, T... array){
        for(T obj: array)
            c.add(obj);
        return c;
    }