/** * Inserts the specified element at the front of this deque. * * @param e * the element to add * @return <tt>true</tt> (as specified by {@link Deque#offerFirst}) * @throws NullPointerException * if the specified element is null */ public boolean offerFirst(E e) { addFirst(e); return true; }
/** * Pushes an element onto the stack represented by this deque. In other * words, inserts the element at the front of this deque. * * <p> * This method is equivalent to {@link #addFirst}. * * @param e * the element to push * @throws NullPointerException * if the specified element is null */ public void push(E e) { addFirst(e); }