UNPKG

jalhyd

Version:

JaLHyd, a Javascript Library for Hydraulics

48 lines 1.4 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ParamsEquationArrayIterator = void 0; const internal_modules_1 = require("../internal_modules"); /** * itérateur sur les paramètres d'un tableau de de ParamsEquation */ class ParamsEquationArrayIterator { constructor(p) { this._index = 0; this._paramsEqs = p; } get done() { return { done: true, value: undefined }; } next() { if (this._currentMapIterator === undefined) { this.nextIterator(); } let res = this.done; if (this._currentMapIterator) { res = this._currentMapIterator.next(); if (res.done) { this.nextIterator(); if (this._currentMapIterator) { res = this._currentMapIterator.next(); } } } return res; } [Symbol.iterator]() { return this; } nextIterator() { if (this._index < this._paramsEqs.length) { this._currentMapIterator = new internal_modules_1.MapIterator(this._paramsEqs[this._index++].map); } else { this._currentMapIterator = undefined; } } } exports.ParamsEquationArrayIterator = ParamsEquationArrayIterator; //# sourceMappingURL=params_equation_array_iterator.js.map