Drains no more than the specified number of elements from the queue to the
specified collection.
@param c collection to add the elements to
@param maxElements maximum number of elements to remove from the queue
@return number of elements added to the collection
@throws UnsupportedOperationException if the add operation is not
supported by the specified collection
@throws ClassCastException if the class of the elements held by this
collection prevents them from being added to the specified
collection
@throws NullPointerException if c is null
@throws IllegalArgumentException if c is this instance
Drains no more than the specified number of elements from the queue to the specified collection.
@param c collection to add the elements to @param maxElements maximum number of elements to remove from the queue
@return number of elements added to the collection @throws UnsupportedOperationException if the add operation is not supported by the specified collection @throws ClassCastException if the class of the elements held by this collection prevents them from being added to the specified collection @throws NullPointerException if c is null @throws IllegalArgumentException if c is this instance