-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hendrik Maryns schreef:
| a schreef:
| | Hi
| |
| | How can I get back to the first element after fini****ng the while loop
| with
| | enum.hasMoreElements()?
|
| You can’t. You can, however, ask for a new Enumerator. However, note
| that Enumerator is obsolete, and has been replaced by Iterator. Please
| use that in your own code, as far as possible.
And then you’ll see that there is ListIterator, in which you can also go
back, and thus to the first element.
Jakarta Commons Collections offers a lot of interesting cl*****
implementing Iterator, such as LoopingIterator, which might be what you
are looking for. However, it is not available with generics yet. I can
send you a generified version if you want.
H.
- --
Hendrik Maryns
http://tcl.sfs.uni-tuebingen.de/~hendrik/
==================
http://aouw.org
Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4-svn0 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org
iD8DBQFIDcFhe+7xMGD3itQRAuebAJ9S6oA5r86lsLxn1od6drfbAcikYQCeKOfz
nLYBPjfarVX5HkOdLH9AHto=
=QbWK
-----END PGP SIGNATURE-----


|