On Saturday, November 17, 2012 09:18:54 PM Claude Warren wrote: > ExtendedIterator.toSet() documentation states that the elements are to > be returned in order. > > But > > NiceIterator.asSet() (the static that is, I suspect, used by many > implementations of ExtendedIterator) uses HashSet() in an intermediate > process. This will change the order to the hash order. Should this > not be a LinkedHashSet so as to maintain the original order?
No. It's a bug in the documentation; it should not say "in order". (Probably a cutnpaste without subsequent editing.) Chris -- RIP Diana Wynne Jones, 1934 - 2011. Epimorphics Ltd, http://www.epimorphics.com Registered address: Court Lodge, 105 High Street, Portishead, Bristol BS20 6PT Epimorphics Ltd. is a limited company registered in England (number 7016688)