@ Override public boolean hasMoreTokens ( ) { log . info ( "Tokens size: [" + tokens . size ( ) + "], position: [" + position . get ( ) + "]" ) ; if ( ! tokens . isEmpty ( ) ) return position . get ( ) < tokens . size ( ) ; else return streamHasMoreTokens ( ) ; }
Checks if any prebuffered tokens left otherswise checks underlying stream