Skip to content

Commit

Permalink
CLDR-18217 For clarity in FullIterable, call iteratorWithoutExtras di…
Browse files Browse the repository at this point in the history
…rectly

-Also for clarity, rename FullIterable.fileIterator to FullIterable.iteratorWithoutExtras
  • Loading branch information
btangmu committed Feb 14, 2025
1 parent 7096f59 commit e30d837
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1564,12 +1564,12 @@ public Iterable<String> fullIterable() {

private static class FullIterable implements Iterable<String>, SimpleIterator<String> {
private final CLDRFile file;
private final Iterator<String> fileIterator; // dataSource only
private final Iterator<String> iteratorWithoutExtras;
private Iterator<String> extraPaths;

FullIterable(CLDRFile file) {
this.file = file;
this.fileIterator = file.dataSource.iterator(); // file.iteratorWithoutExtras();
this.iteratorWithoutExtras = file.iteratorWithoutExtras();
}

@Override
Expand All @@ -1581,8 +1581,8 @@ public Iterator<String> iterator() {

@Override
public String next() {
if (fileIterator.hasNext()) {
return fileIterator.next();
if (iteratorWithoutExtras.hasNext()) {
return iteratorWithoutExtras.next();
}
if (extraPaths == null) {
extraPaths = file.getExtraPaths().iterator();
Expand Down

0 comments on commit e30d837

Please sign in to comment.