base/common/src/main/com/thesett/common/util/AbstractHeap.java
public boolean addAll(Collection<? extends E> collection)
    {
        if (collection == null)
        {
            throw new IllegalArgumentException("The 'collection' parameter may not be null.");
        }

        if (collection == this)
        {
            throw new IllegalArgumentException();
        }

        boolean modified = false;

        for (E aC : collection)
        {
            if (add(aC))
            {
                modified = true;
            }
        }

        return modified;
    }
public boolean addAll(Collection<? extends E> collection)
    {
        if (collection == null)
        {
            throw new IllegalArgumentException("The 'collection' parameter may not be null.");
        }

        if (collection == this)
        {
            throw new IllegalArgumentException();
        }

        boolean modified = false;

        for (E aC : collection)
        {
            if (add(aC))
            {
                modified = true;
            }
        }

        return modified;
    }
public boolean addAll ( Collection < ? extends E > collection ) { if ( collection == null ) { throw new IllegalArgumentException ( "The 'collection' parameter may not be null." ) ; } if ( collection == this ) { throw new IllegalArgumentException ( ) ; } boolean modified = false ; for ( E aC : collection ) { if ( add ( aC ) ) { modified = true ; } } return modified ; }
Adds all of the elements in the specified collection to this heap. Attempts to addAll of a queue to itself result
in <tt>IllegalArgumentException</tt>. Further, the behavior of this operation is undefined if the specified
collection is modified while the operation is in progress.

<p>This implementation iterates over the specified collection, and adds each element returned by the iterator to
this collection, in turn. A runtime exception encountered while trying to add an element (including, in
particular, a <tt>null</tt> element) may result in only some of the elements having been successfully added when
the associated exception is thrown.

@param  collection collection whose elements are to be added to this collection.

@return <tt>true</tt> if this collection changed as a result of the call.

@throws NullPointerException     if the specified collection or any of its elements are null.
@throws IllegalArgumentException if collection is this queue.

@see    #add(Object)
Adds all of the elements in the specified collection to this heap . Attempts to addAll of a queue to itself result in <tt > IllegalArgumentException< / tt > . Further the behavior of this operation is undefined if the specified collection is modified while the operation is in progress .