lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tatu Saloranta <>
Subject Re: Suggestion for
Date Wed, 14 Apr 2004 02:38:21 GMT
On Tuesday 13 April 2004 15:31, Holger Klawitter wrote:
> Hi Erik,
> > What is wrong with simply creating a new token that replaces an
> > incoming one for synonyms?
> > I'm just playing devil's advocate here.... since you can already get
> > the termText() through the public _method_.
> Well, you're right; I forgot about cloning, but ... (Lords advocate :-)
> 1.) Cloning implies the need to change filters whenever the fields in Token
> change.

On the other hand, one needs to be sure that no other code assumes Tokens are 
immutable. For example, if they weren't one couldn't reliably use tokens in 
Sets or Maps (not sure if it's useful to do that, just an example).

I guess it's really matter of whether tokens were designed as immutable (which 
often makes sense for similar objects), or if they just happen to be, due to 
lack of modifier method(s).

-+ Tatu +-

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message