Does the implementation of the java.util.Iterator use the State pattern? -


i looking reasonable answear how implementation of

java.util.iterator  

is coming under state design pattern

edit

please refer below link

examples of gof design patterns in java's core libraries

that, not sure. far know, implementation of iterator design pattern.

however, can, wrongly, said uses state pattern, calling next() affects state of iterator object. but, imo, not state pattern implementation, doesn't change base object on operation has executed. wikipedia having fine java example of state pattern.


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -