Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iterator Design Pattern #1

Open
anamabri opened this issue Jan 2, 2021 · 0 comments
Open

Iterator Design Pattern #1

anamabri opened this issue Jan 2, 2021 · 0 comments

Comments

@anamabri
Copy link

anamabri commented Jan 2, 2021

I was checking your code and i want to suggest you something that can be helpful to you. You can use the design Pattern Iterator in most of your classes for example the class GooglePlace is frequently traversed in the project. Instead of using many For Loops you can implement the structure of this pattern with an interface Iterator that declares the operations required for traversing the collection and another interface where you can have the method Iterator that can be implemented in a concrete class in this case GooglePlace. But this Iterator interface can be used again with another collection you just have to make another concrete class and modify what you need. Have a good day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant