|
||||||||||
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(Collection files)
Creates a new instance from a Collection of
file names. |
Method Summary | |
---|---|
protected static int |
getDepth(String directory)
Returns the depth of the directory |
List |
getDirectories()
Gets a list of String s containing the
directories in the file set, ordered by name. |
protected static String |
getDirectory(String filename)
Returns directory name of specified file |
List |
getFiles(String directory)
Gets the names of all files which reside in a given directory. |
protected static String |
getParent(String directory)
Returns name of parent directory to specified directory |
protected static String |
getRelativeFilename(String filename,
String dir)
Returns relative filename for specified file and directory |
protected static boolean |
isInDirectory(String filename,
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(Collection files)
Collection
of
file names.
files
- Collection containing the String representations of filesMethod Detail |
---|
public List getDirectories()
String
s containing the
directories in the file set, ordered by name.
String
s containing the
directories in the file set, ordered by name.public List getFiles(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(String filename, String directory)
filename
- File to testdirectory
- Directory to test
protected static String getRelativeFilename(String filename, String dir)
filename
- filedir
- directory
protected static String getDirectory(String filename)
filename
- file to compute
protected static String getParent(String directory)
directory
- to use
protected static int getDepth(String directory)
directory
- to be analysed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |