private RecursiveFilenameIterator(File root, int prefixLength) { this.root = root; this.prefixLength = prefixLength; if (!isRootFile()) { innerIterators = getInnerIterators(root); } }
private RecursiveFilenameIterator(File root, int prefixLength) { this.root = root; this.prefixLength = prefixLength; if (!isRootFile()) { innerIterators = getInnerIterators(root); } }
private RecursiveFilenameIterator(File root, int prefixLength) { this.root = root; this.prefixLength = prefixLength; if (!isRootFile()) { innerIterators = getInnerIterators(root); } }
public String next() { if (isRootFile()) { if (alreadyUsed) { throw new NoSuchElementException(); } alreadyUsed = true; return root.getAbsolutePath().substring(prefixLength); } if (hasNext()) { return currentIterator().next(); } throw new NoSuchElementException(); }
public String next() { if (isRootFile()) { if (alreadyUsed) { throw new NoSuchElementException(); } alreadyUsed = true; return root.getAbsolutePath().substring(prefixLength); } if (hasNext()) { return currentIterator().next(); } throw new NoSuchElementException(); }
public String next() { if (isRootFile()) { if (alreadyUsed) { throw new NoSuchElementException(); } alreadyUsed = true; return root.getAbsolutePath().substring(prefixLength); } if (hasNext()) { return currentIterator().next(); } throw new NoSuchElementException(); }
public boolean hasNext() { if (isRootFile()) { return !alreadyUsed; } if (index >= innerIterators.size()) { return false; } if (currentIterator().hasNext()) { return true; } index++; return hasNext(); }
public boolean hasNext() { if (isRootFile()) { return !alreadyUsed; } if (index >= innerIterators.size()) { return false; } if (currentIterator().hasNext()) { return true; } index++; return hasNext(); }
public boolean hasNext() { if (isRootFile()) { return !alreadyUsed; } if (index >= innerIterators.size()) { return false; } if (currentIterator().hasNext()) { return true; } index++; return hasNext(); }