Reference/Utility Classes/ArrayIterator¶
A utility class for getting a full iter-over iteration context from an otherwise primitive array.
How-To/Usage Guide
Find a how-to/usage guide for the ArrayIterator here class,
or navigate to it via the 'The Basics' tab.
Class Signature¶
Description
A utility class for getting a full iter-over iteration context from an otherwise primitive array.
Generic Arguments
- E [any] The type of element contained in the underlying array.
Initial Version v0.1.0
Latest Version v2.1.0
1 | |
Inheritance¶
Direct:
AbstractIterator: A generic iterator very similar to the pattern used in Java.
Indirect:
- none
Direct:
- none
Indirect:
- none
Instance Method Signatures¶
#hasNext¶
Description
Returns true if this iterator has at least one more element that can be returned from next().
Returns [boolean] true if this iterator has at least one more element that can be returned from
next().
Overrides AbstractIterator#hasNext
1 | |
#next¶
Description
Returns the next element of the underlying array, or undefined if there are no more elements to consume.
Returns [E | undefined] The next element of the underlying array, or undefined if there are no more
elements to consume.
Overrides AbstractIterator#next
1 | |
#remove¶
Description
Removes and returns the last element returned by the next() method from the underlying array.
Returns [E | undefined] The last element returned by the next() method.
Overrides AbstractIterator#remove
1 | |
#reset¶
Description
Resets this iterator back to the first element of the underlying array.
Overrides AbstractIterator#reset
1 | |