[ 
https://issues.apache.org/jira/browse/LUCENE-4881?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13617240#comment-13617240
 ] 

Michael McCandless commented on LUCENE-4881:
--------------------------------------------

I don't think we need to mimic java's Iterator?  Ie, it's fine to have only 
next()...

Also, the iterator is wrong if a rehash happens right?  Can you add to the 
javadocs that the set should not be modified while the iterator is in use, 
except using the iterator's remove method (like Java's HashMap)?
                
> Add a set iterator to SentinalIntSet
> ------------------------------------
>
>                 Key: LUCENE-4881
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4881
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: David Smiley
>            Assignee: David Smiley
>            Priority: Minor
>             Fix For: 4.3
>
>         Attachments: LUCENE-4881_SentinalIntSet_int_iterator.patch
>
>
> I'm working on code that needs a hash based int Set.  It will need to iterate 
> over the values, but SentinalIntSet doesn't have this utility feature.  It 
> should be pretty easy to add.
> FYI this is an out-growth of a question I posed to the dev list, examining 3 
> different int hash sets out there: SentinalIntSet, IntHashSet (in Lucene 
> facet module) and the 3rd party IntOpenHashSet (HPPC) -- see 
> http://lucene.472066.n3.nabble.com/IntHashSet-SentinelIntSet-SortedIntDocSet-td4037516.html
>   I decided to go for SentinalIntSet because it's already in Lucene-core, 
> adding the method I need should be easy, and it has a nice lean 
> implementation.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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

Reply via email to