lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless" <luc...@mikemccandless.com>
Subject Re: Token termBuffer issues
Date Tue, 24 Jul 2007 22:07:42 GMT

"Doron Cohen" <DORONC@il.ibm.com> wrote:
> "Michael McCandless" wrote:
> 
> >   boolean next(Token resToken)
> >
> > which returns true if it has updated resToken with another token,
> > else false if end-of-stream was hit.
> 
> I would actually prefer
>     Token next(Token resToken)
> because:
> - this was the API with reuse is very much like the one without reuse
> (except for the reusable param) - easier for app dev.
> - it allows to return useful result also in cases where the specific
> implementation does not support reuse, or null was passed (indicating
> reuse
> is not desired), or something in the data/state inhibited reuse.

I see.  So the callee is allowed to return a different token than
resToken?  Ie passing "resToken" is just a suggestion that you may use
resToken to return your result but you are not required to.  OK I'll
try this approach...

Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message