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;
}

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 ; }
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 .
