code: @Nullable
    public ELEMENTTYPE replaceTopElement (@Nullable final ELEMENTTYPE aItem)
    {
      if (isEmpty ())
        throw new EmptyStackException ();
      setLast (aItem);
      return aItem;
    }
docs: Replaces the top element in the stack. This is a shortcut for
  <code>pop (); push (aItem);</code>
  
  @param aItem
  the item to be pushed onto this stack.
  @return the <code>aItem</code> argument.
  @throws EmptyStackException
  if the stack is empty