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
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
Post a Comment