Skip to content

Reference/Utility Classes/ObjectIterator

An iterator that iterates over the keys of an object.

How-To/Usage Guide

Find a how-to/usage guide for the ObjectIterator here class, or navigate to it via the 'The Basics' tab.


Class Signature

Description
An iterator that iterates over the keys of an object.

Generic Arguments
- T [StringIndexedObject] The type of the object that is being iterated over.

Initial Version v0.1.0
Latest Version v2.0.0

1
2
class ObjectIterator<T extends StringIndexedObject>
    extends AbstractIterator<KeyValuePair<keyof T, ValueOf<T>> | undefined>

Inheritance

Direct:

  • AbstractIterator: A generic iterator very similar to the pattern used in Java.

Indirect:

  • none

Direct:

  • none

Indirect:

  • IIterator: An interface representing the general form of an iterable class.

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
public hasNext(): boolean

#next

1
public next(): KeyValuePair<keyof T, ValueOf<T>> | undefined

#remove

1
public remove(): KeyValuePair<keyof T, ValueOf<T>> | undefined

#reset

1
public reset(): void