On Dec 28, 2007 8:20 AM, Doron Cohen <[EMAIL PROTECTED]> wrote: > The "contract" of the two next methods as I understand it is that > a TS must implement one of them. I see no harm in implementing > the two (but doing so is likely to just duplicate TokenStream's code.)
I don't think the contract was ever laid out so strictly. I think it's fine for any TokenStream to implement both if it's advantageous to do so. > For SinkTokenizer it actually implements next with no reuse logic, > so it really should implement just next(). Then, if any consumer > of SinkTokenizer calls next(Token), the default impl of this method > in TokenStream would call SinkTokenizers' next(). > > Do you agree with this? A agree. The current implementation is sub-optimal if the caller uses next() -Yonik --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]