File tree Expand file tree Collapse file tree
klab.engine/src/main/java/org/integratedmodelling/klab/scale Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -455,19 +455,27 @@ public List<IServiceCall> getKimSpecification() {
455455 private class ScaleIterator implements Iterator <ILocator > {
456456
457457 long offset = 0 ;
458+
459+ private void moveToCovered () {
460+ while (this .offset < size () && !isCovered (offset )) {
461+ this .offset ++;
462+ }
463+ }
458464
459465 @ Override
460466 public boolean hasNext () {
467+ moveToCovered ();
461468 return offset < size ();
462469 }
463470
464471 @ Override
465472 public IScale next () {
473+ moveToCovered ();
466474 IScale ret = new Scale (Scale .this , offset );
467475 this .offset ++;
468- while (this .offset < size () && !isCovered (offset )) {
469- this .offset ++;
470- }
476+ // while (this.offset < size() && !isCovered(offset)) {
477+ // this.offset++;
478+ // }
471479 return ret ;
472480 }
473481 }
You can’t perform that action at this time.
0 commit comments