On Thursday 02 August 2007 19:28:48 Mohammad Norouzi wrote:
> you should not store them in an Array structure since they will take up the
> memory.
> the BitSet is the best structure to store them

You can't store strings in a BitSet.

What I would do is return a List<String> but make a custom subclass of 
AbstractList<String> which creates the strings on demand from the Hits 
object.  We use similar tricks to convert Hits into a List of another more 
complex object type and it works great.  You can cache the strings as they're 
retrieved if you're planning to use some strings much more than others.

Daniel


-- 
Daniel Noll
Nuix Pty Ltd
Suite 79, 89 Jones St, Ultimo NSW 2007, Australia    Ph: +61 2 9280 0699
Web: http://nuix.com/                               Fax: +61 2 9212 6902

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to