Commit 8708b601 authored by Grand Francois's avatar Grand Francois
Browse files

refactor: rename Nub.allChildNubIterator() to directChildNubIterator()

refs #302
Showing with 7 additions and 7 deletions
+7 -7
......@@ -569,7 +569,7 @@ export abstract class Nub extends ComputeNode implements IProperties {
stats = this._result.resultElementsLogStats(0, stats);
let sn = 1;
const it = this.allChildNubIterator();
const it = this.directChildNubIterator();
let icn = it.next();
while (!icn.done) {
stats = icn.value.result.resultElementsLogStats(sn++, stats);
......@@ -737,9 +737,9 @@ export abstract class Nub extends ComputeNode implements IProperties {
}
/**
* @returns iterator on all child nubs (may include extra nubs, see Pab nub)
* @returns iterator on direct child nubs (may include extra nubs, see Pab nub)
*/
public allChildNubIterator() {
public directChildNubIterator() {
return this._children[Symbol.iterator]();
}
......
......@@ -36,9 +36,9 @@ export class Pab extends FishPass {
/**
* @returns iterator on all child nubs (may include extra nubs, see Pab nub)
* @see Nub.allChildNubIterator()
* @see Nub.directChildNubIterator()
*/
public allChildNubIterator() {
public directChildNubIterator() {
// clone children array
const arr = Object.assign([], this.children);
// append wall at downstream
......
......@@ -132,7 +132,7 @@ export class Result extends JalhydObject {
if (re !== undefined) {
res.push(re);
}
const it: Iterator<Nub> = this._sourceNub.allChildNubIterator();
const it: Iterator<Nub> = this._sourceNub.directChildNubIterator();
let inub = it.next()
while (!inub.done) {
let re = inub.value.result._resultElements[index];
......@@ -289,7 +289,7 @@ export class Result extends JalhydObject {
}
if (recurs && this._sourceNub !== undefined) {
for (const n of this._sourceNub.allChildNubIterator()) {
for (const n of this._sourceNub.directChildNubIterator()) {
if (n.result.hasMessage(code, true)) {
return true;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment