The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Originally posted by Ilja Preuss:
I often prefer to return Arrays, simply because it communicates better the type of the objects in the collection. Of course this will change with Tiger's generics - then I would prefer iterators because they provide better decoupling.
"I'm not back." - Bill Harding, Twister
Peter den Haan | peterdenhaan.com | quantum computing specialist, Objectivity Ltd
Originally posted by Peter den Haan:
You might want to return an Iterator instead of a Collection (or array) if you want to process things in streaming mode.
"I'm not back." - Bill Harding, Twister
"I'm not back." - Bill Harding, Twister
Le Cafe Mouse - Helen's musings on the web - Java Skills and Thrills
"God who creates and is nature is very difficult to understand, but he is not arbitrary or malicious." OR "God does not play dice." - Einstein
When you have exhausted all possibilities, remember this: you haven't - Edison. Tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
|