Inserts the specified element at the end of this deque unless it would
violate capacity restrictions. When using a capacity-restricted deque,
this method is generally preferable to the addLast
method,
which can fail to insert an element only by throwing an exception.
e | the element to add |
true
if the element was added to this deque, else
false
ClassCastException | if the class of the specified element prevents it from being added to this deque | |
NullPointerException | if the specified element is null and this deque does not permit null elements | |
IllegalArgumentException | if some property of the specified element prevents it from being added to this deque |
Diagram: Collection Queue