Re: generators in Java?
- From: "Diez B. Roggisch" <deets@xxxxxxxxxxxxx>
- Date: Sat, 31 Dec 2005 10:44:49 +0100
Tom Sheffler schrieb:
This may have been discussed before, so I apologize.
Does Java have generators? I am aware of the "Iterator" interface, but it seems much more restrictive. Python generators are useful for many more things than simply list enumeration, but the Java Iterator seems limited.
No, it hasn't. One thing people do is to create threads that communicate via a queue and block while that queue has an item in it. But of course that comes at additional overhead of thread context switching.
Regards,
Diez .
- References:
- generators in Java?
- From: Tom Sheffler
- generators in Java?
- Prev by Date: Re: py-cocoa?
- Next by Date: Re: python coding contest
- Previous by thread: generators in Java?
- Next by thread: python encoding bug?
- Index(es):