Adds the specified element into the stack if it is possible to do so immediately without
violating capacity restrictions, otherwise, throwing an IllegalStateException
if no space is currently available or NullPointerException if the specified element is null.