Iterator
public
Iterator(object
:
Object)
Creates an Iterator instance for the specified object.
The Iterator for the object is created by calling the
object's __iterator__ method. If there is no __iterator__ method,
a default iterator is created. The default iterator provides access to
the object's properties, according to the usual for...in and for
each...in model.
If you want to provide a custom iterator, you should override
the __iterator__ method to return an instance of your custom iterator.
Parameters:
object
-
the object whose values will be accessible via the Iterator.
Iterator
public
Iterator(object
:
Object, keysOnly
:
boolean)
Creates an Iterator instance for the specified object's keys.
The Iterator for the object is created by calling the
object's __iterator__ method. If there is no __iterator__ method,
a default iterator is created. The default iterator provides access to
the object's properties, according to the usual for...in and for
each...in model.
If you want to provide a custom iterator, you should override
the __iterator__ method to return an instance of your custom iterator.
Parameters:
object
-
the object whose keys or values will be accessible via the Iterator.
keysOnly
-
if true, provides access to the object's keys. If false, provides access to the object's values.