|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.statcvs.model.Directory
public abstract class Directory
Represents a directory in the module. A container for CvsFile
s.
Constructor Summary | |
---|---|
Directory()
|
Method Summary | |
---|---|
void |
addFile(CvsFile file)
Adds a file to this directory |
void |
addSubdirectory(Directory dir)
Adds a subdirectory to this directory. |
int |
compareTo(java.lang.Object o)
|
int |
getCurrentFileCount()
Returns the number of files in this directory. |
int |
getCurrentLOC()
Returns the number of code lines in this directory. |
abstract int |
getDepth()
|
java.util.Collection |
getFiles()
Returns all CvsFile objects in this directory |
abstract java.lang.String |
getName()
Returns the directory's name without full path or any slashes, e.g. |
abstract Directory |
getParent()
Returns the directory's parent directory or null if it is the root |
abstract java.lang.String |
getPath()
Returns the directory's full path with trailing slash, for example "src/net/sf/statcvs/" |
RevisionIterator |
getRevisionIterator()
Returns a RevisionIterator of all revisions to files in this directory. |
java.util.Collection |
getSubdirectories()
Returns a collection of all immediate subdirectories |
java.util.List |
getSubdirectoriesRecursive()
Returns a list of all subdirectories, including their subdirectories and this directory itself. |
boolean |
isEmpty()
Returns true if all files in this directory and its
subdirectories are deleted, or if it doesn't have any files and
subdirectories at all. |
abstract boolean |
isRoot()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Directory()
Method Detail |
---|
public abstract java.lang.String getName()
public abstract java.lang.String getPath()
public abstract Directory getParent()
public abstract boolean isRoot()
public abstract int getDepth()
public void addFile(CvsFile file)
file
- a file in this directorypublic java.util.Collection getFiles()
CvsFile
objects in this directory
public RevisionIterator getRevisionIterator()
public void addSubdirectory(Directory dir)
dir
- an immediate subdirectorypublic java.util.Collection getSubdirectories()
Directory
objectspublic java.util.List getSubdirectoriesRecursive()
Directory
objectspublic int getCurrentLOC()
public int getCurrentFileCount()
public boolean isEmpty()
true
if all files in this directory and its
subdirectories are deleted, or if it doesn't have any files and
subdirectories at all.
TODO: Write tests!
true
if the directory is currently emptypublic int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
Comparable.compareTo(java.lang.Object)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |