public < T extends ElementType < E > > boolean positiveLookaheadUntil ( int until , T ... expected ) { for ( int i = 1 ; i <= until ; i ++ ) { for ( ElementType < E > type : expected ) { if ( type . isMatchedBy ( lookahead ( i ) ) ) { return true ; } } } return false ; }
Checks if there is an element in this stream of the expected types until the specified position .