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

javascript - Iterate over array and calculate average values of array-parts -

iphone - Using nested NSDictionary with Picker -

objective c - Newbie question -multiple parameters -