@ SuppressWarnings ( "unchecked" ) public T pop ( ) throws EmptyStackException { int i ; if ( ( i = -- size ) >= 0 ) { T element = ( T ) elements [ i ] ; elements [ i ] = null ; return element ; } else { size = 0 ; throw new EmptyStackException ( ) ; } }
Removes the object at the top of this stack and returns that object as the value of this function .