Inserts the specified element into this queue if it is possible to do
so immediately without violating capacity restrictions, returning
{@code true} upon success and throwing an
{@code IllegalStateException} if no space is currently available.
When using a capacity-restricted queue, it is generally preferable to
use {@link #offer(Object) offer}.
@param e the element to add
@return {@code true} (as specified by {@link Collection#add})
@throws IllegalStateException if the element cannot be added at this
time due to capacity restrictions
@throws ClassCastException if the class of the specified element
prevents it from being added to this queue
@throws NullPointerException if the specified element is null
@throws IllegalArgumentException if some property of the specified
element prevents it from being added to this queue
Inserts the specified element into this queue if it is possible to do so immediately without violating capacity restrictions, returning {@code true} upon success and throwing an {@code IllegalStateException} if no space is currently available. When using a capacity-restricted queue, it is generally preferable to use {@link #offer(Object) offer}.
@param e the element to add @return {@code true} (as specified by {@link Collection#add}) @throws IllegalStateException if the element cannot be added at this time due to capacity restrictions @throws ClassCastException if the class of the specified element prevents it from being added to this queue @throws NullPointerException if the specified element is null @throws IllegalArgumentException if some property of the specified element prevents it from being added to this queue