/** * Removes the object at the top of this stack and returns that object. * * @return The object at the top of this stack * @exception EmptyStackException * If this stack is empty. */ public final T pop() { final T top = peek(); remove(size() - 1); return top; }
/** * Removes the object at the top of this stack and returns that object. * * @return The object at the top of this stack * @exception EmptyStackException * If this stack is empty. */ public final Object pop() { final Object top = peek(); remove(size() - 1); return top; }
/** * @see java.io.ObjectInputStream#defaultReadObject() */ @Override public void defaultReadObject() throws IOException, ClassNotFoundException { Object currentObject = stack.peek(); if (!defaultRead.contains(currentObject)) { defaultRead.add(currentObject); currentStreamHandler.readFields(this, currentObject); } }
/** * @see java.io.ObjectInputStream#defaultReadObject() */ public void defaultReadObject() throws IOException, ClassNotFoundException { Object currentObject = stack.peek(); if (!defaultRead.contains(currentObject)) { defaultRead.add(currentObject); currentStreamHandler.readFields(this, currentObject); } }