Mercurial > hg4j
comparison src/org/tmatesoft/hg/util/FileIterator.java @ 141:8248aae33f7d
Adopt FileIterator moving towards WCStatusCollector parameterizing. Improved path handling, move 'em around
| author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
|---|---|
| date | Thu, 17 Feb 2011 04:08:34 +0100 |
| parents | |
| children | 26ad7827a62d |
comparison
equal
deleted
inserted
replaced
| 140:1c1891ad1c73 | 141:8248aae33f7d |
|---|---|
| 1 /* | |
| 2 * Copyright (c) 2011 TMate Software Ltd | |
| 3 * | |
| 4 * This program is free software; you can redistribute it and/or modify | |
| 5 * it under the terms of the GNU General Public License as published by | |
| 6 * the Free Software Foundation; version 2 of the License. | |
| 7 * | |
| 8 * This program is distributed in the hope that it will be useful, | |
| 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 11 * GNU General Public License for more details. | |
| 12 * | |
| 13 * For information on how to redistribute this software under | |
| 14 * the terms of a license other than GNU General Public License | |
| 15 * contact TMate Software at support@hg4j.com | |
| 16 */ | |
| 17 package org.tmatesoft.hg.util; | |
| 18 | |
| 19 import java.io.File; | |
| 20 | |
| 21 /** | |
| 22 * Abstracts iteration over file system. | |
| 23 * | |
| 24 * @author Artem Tikhomirov | |
| 25 * @author TMate Software Ltd. | |
| 26 */ | |
| 27 public interface FileIterator { | |
| 28 | |
| 29 /** | |
| 30 * Brings iterator into initial state to facilitate new use. | |
| 31 */ | |
| 32 void reset(); | |
| 33 | |
| 34 /** | |
| 35 * @return whether can shift to next element | |
| 36 */ | |
| 37 boolean hasNext(); | |
| 38 | |
| 39 /** | |
| 40 * Shift to next element | |
| 41 */ | |
| 42 void next(); | |
| 43 | |
| 44 /** | |
| 45 * @return repository-local path to the current element. | |
| 46 */ | |
| 47 Path name(); | |
| 48 | |
| 49 /** | |
| 50 * @return filesystem element. | |
| 51 */ | |
| 52 File file(); | |
| 53 } |
