public String next ( ) { if ( fifo . isEmpty ( ) ) { throw new RuntimeException ( "Fifo is empty" ) ; } String cmd = ( String ) fifo . get ( 0 ) ; fifo . remove ( 0 ) ; return cmd ; }
Gets the next command from the stack .