|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.statcvs.renderer.FileCollectionFormatter
public class FileCollectionFormatter
Groups a set of file names by directory. Provides a list of directories in the file set, and lumps directories with only one file together with its parent directory.
| Constructor Summary | |
|---|---|
FileCollectionFormatter(java.util.Collection files)
Creates a new instance from a Collection of
file names. |
|
| Method Summary | |
|---|---|
protected static int |
getDepth(java.lang.String directory)
Returns the depth of the directory |
java.util.List |
getDirectories()
Gets a list of Strings containing the
directories in the file set, ordered by name. |
protected static java.lang.String |
getDirectory(java.lang.String filename)
Returns directory name of specified file |
java.util.List |
getFiles(java.lang.String directory)
Gets the names of all files which reside in a given directory. |
protected static java.lang.String |
getParent(java.lang.String directory)
Returns name of parent directory to specified directory |
protected static java.lang.String |
getRelativeFilename(java.lang.String filename,
java.lang.String dir)
Returns relative filename for specified file and directory |
protected static boolean |
isInDirectory(java.lang.String filename,
java.lang.String directory)
Returns TRUE if file is in specified directroy, FALSE otherwise |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileCollectionFormatter(java.util.Collection files)
Collection of
file names.
files - Collection containing the String representations of files| Method Detail |
|---|
public java.util.List getDirectories()
Strings containing the
directories in the file set, ordered by name.
Strings containing the
directories in the file set, ordered by name.public java.util.List getFiles(java.lang.String directory)
getDirectories()
list. Files will be relative to the directory. They will be
ordered by name.
directory - to process
getDirectories()
list. Files will be relative to the directory. They will be
ordered by name.
protected static boolean isInDirectory(java.lang.String filename,
java.lang.String directory)
filename - File to testdirectory - Directory to test
protected static java.lang.String getRelativeFilename(java.lang.String filename,
java.lang.String dir)
filename - filedir - directory
protected static java.lang.String getDirectory(java.lang.String filename)
filename - file to compute
protected static java.lang.String getParent(java.lang.String directory)
directory - to use
protected static int getDepth(java.lang.String directory)
directory - to be analysed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||