Path: csiph.com!usenet.pasdenom.info!gegeweb.org!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Jim Janney Newsgroups: comp.lang.java.programmer Subject: Re: How convert Iterator into Enumeration Date: Wed, 28 Nov 2012 11:11:47 -0700 Organization: Transylvania Polygnostic Lines: 18 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx04.eternal-september.org; posting-host="75975abe3fe3503ca7350803ab98e478"; logging-data="4843"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Ptvh6A0snhvtHS59FNQbw" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) Cancel-Lock: sha1:i5akYn8oMWajG1Ts1atz+LSxwDU= sha1:AWKDcRv34XdMcDQG9UKioRVAYGY= Xref: csiph.com comp.lang.java.programmer:20005 Jim Janney writes: > Jan Burse writes: > >> Dear All, >> >> Is there a fast way to have an Enumeration from a HashMap? >> > > IteratorUtils in Apache Commons has a conversion method. > > http://commons.apache.org/collections/api-3.1/org/apache/commons/collections/IteratorUtils.html#asEnumeration%28java.util.Iterator%29 Even easier, just use the enumeration method in java.util.Collections. -- Jim Janney