question: public void consume ( String seq ) { if ( ! matches ( seq ) ) throw new IllegalStateException ( "Queue did not match expected sequence" ) ; int len = seq . length ( ) ; if ( len > remainingLength ( ) ) throw new IllegalStateException ( "Queue not long enough to consume sequence" ) ; pos += len ; }
target:  Consumes the supplied sequence of the queue. If the queue does not start with the supplied sequence, will throw an illegal state exception -- but you should be running match() against that condition. <p/> Case insensitive.