Pushes an element onto the stack represented by this deque (in other
words, at the head of this deque) if it is possible to do so
immediately without violating capacity restrictions, throwing an
{@code IllegalStateException} if no space is currently available.
<p>This method is equivalent to {@link #addFirst}.
@param e the element to push
@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 deque
@throws NullPointerException if the specified element is null and this
deque does not permit null elements
@throws IllegalArgumentException if some property of the specified
element prevents it from being added to this deque
Pushes an element onto the stack represented by this deque (in other words, at the head of this deque) if it is possible to do so immediately without violating capacity restrictions, throwing an {@code IllegalStateException} if no space is currently available.
<p>This method is equivalent to {@link #addFirst}.
@param e the element to push @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 deque @throws NullPointerException if the specified element is null and this deque does not permit null elements @throws IllegalArgumentException if some property of the specified element prevents it from being added to this deque