Provides methods to iterate over a collection or list of elements of the same type.
Inheritance Hierarchy
IEnumerator
Examples
const e = someList.getEnumerator()
// always move before you access
while (e.moveNext()) {
// get the current element
const current = e.current
}
Type Parameters
- T
Type Details
- yfiles module
- core
- yfiles-umd modules
- All modules
- Legacy UMD name
- yfiles.collections.IEnumerator
Properties
Gets the element at the enumerator's current position.
Remarks
This value is undefined if the enumerator is in initial state (after creation or reset) or has been moved past the end of the represented collection.
Methods
Moves this enumerator to the next element.
Remarks
A newly created enumerator's current position is before the first element. Thus, this method must be called before first access to the current property. The same applies to the state after calling reset.
Returns
- ↪boolean
true
if the enumerator was moved to a valid position