Object built-in object

Object Iterator

Iterator object, used to traverse the collection data

Inheritance

#lineWidth: 1.5 #font: Helvetica,sans-Serif #fontSize: 10 #leading: 1.6 #.this: fill=lightgray #.class: fill=white [<class>object|toString();toJSON()] [<this>Iterator|@iterator()|next()] [object] <:- [Iterator] Iterator @iterator() next() object toString() toJSON()

Operator

@iterator

Query the iterator of the current object element

1
Iterator Iterator.@iterator();

Return result:

  • Iterator, Returns an iterator of current object elements

Member function

next

Iterate the next element

1
(Value value, Boolean done) Iterator.next();

Return result:

  • (Value value, Boolean done), return the next element, or mark the end of iteration

toString

Returns the string representation of the object, generally returns "[Native Object]", the object can be re-implemented according to its own characteristics

1
String Iterator.toString();

Return result:

  • String, Returns the string representation of the object

toJSON

Returns the JSON format representation of the object, generally returns a collection of readable attributes defined by the object

1
Value Iterator.toJSON(String key = "");

Call parameters:

  • key: String, unused

Return result:

  • Value, Returns a value containing JSON serializable