wood burning stoves 2.0*
The moose likes OO, Patterns, UML and Refactoring and the fly likes Iterator Pattern Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Iterator Pattern" Watch "Iterator Pattern" New topic
Author

Iterator Pattern

simorgh hossein
Greenhorn

Joined: Sep 06, 2007
Posts: 1
Please explain Iterator Pattern in JAVA by a simple example,Thanks in advance
[ November 11, 2008: Message edited by: simorgh hossein ]

Beyond the seas there is a town<br />In which windows open to manifestation<br />There rooftops quarter pigeons that looks at the jets of human intelligence
Nitesh Kant
Bartender

Joined: Feb 25, 2007
Posts: 1638

Iterator pattern is extensively used by all java Collection classes.
Nothing like going through the code and understanding yourself


apigee, a better way to API!
Sergey Arnaut
Greenhorn

Joined: Nov 03, 2008
Posts: 7
The java implementationof iterator pattern allows user to traverse carious types of data sets without worrying about the underlying implementation of collection. Since clients simply interact with the iterator for themselves. Some will allow full access to the underlying data sets while others may restrict certain functionalities, such as removing items.

---- "Design patterns" by Jason McDonald

For example, just open src.zip in your JAVA_HOME or whait a few ours till I found my old examples
Sergey Arnaut
Greenhorn

Joined: Nov 03, 2008
Posts: 7
Here is example:



Any questions?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Iterator Pattern