net.sf.statcvs.model
Class DirectoryRoot

java.lang.Object
  extended bynet.sf.statcvs.model.Directory
      extended bynet.sf.statcvs.model.DirectoryRoot
All Implemented Interfaces:
java.lang.Comparable

public class DirectoryRoot
extends Directory

The root of a tree of Directory objects

Version:
$Id: DirectoryRoot.java,v 1.2 2003/04/20 17:45:49 cyganiak Exp $
Author:
Richard Cyganiak

Constructor Summary
DirectoryRoot()
           
 
Method Summary
 int getDepth()
           
 java.lang.String getName()
          Returns the directory's name without full path or any slashes, e.g.
 Directory getParent()
          Returns the directory's parent directory or null if it is the root
 java.lang.String getPath()
          Returns the directory's full path with trailing slash, for example "src/net/sf/statcvs/"
 boolean isRoot()
           
 java.lang.String toString()
           
 
Methods inherited from class net.sf.statcvs.model.Directory
addFile, addSubdirectory, compareTo, getCurrentFileCount, getCurrentLOC, getFiles, getRevisionIterator, getSubdirectories, getSubdirectoriesRecursive, isEmpty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DirectoryRoot

public DirectoryRoot()
Method Detail

getName

public java.lang.String getName()
Description copied from class: Directory
Returns the directory's name without full path or any slashes, e.g. "src"

Specified by:
getName in class Directory
Returns:
the directory's name
See Also:
Directory.getName()

getPath

public java.lang.String getPath()
Description copied from class: Directory
Returns the directory's full path with trailing slash, for example "src/net/sf/statcvs/"

Specified by:
getPath in class Directory
Returns:
the directory's path
See Also:
Directory.getPath()

getParent

public Directory getParent()
Description copied from class: Directory
Returns the directory's parent directory or null if it is the root

Specified by:
getParent in class Directory
Returns:
the directory's parent
See Also:
Directory.getParent()

isRoot

public boolean isRoot()
Specified by:
isRoot in class Directory
Returns:
true if this is the root of the directory tree
See Also:
Directory.isRoot()

toString

public java.lang.String toString()
See Also:
Object.toString()

getDepth

public int getDepth()
Specified by:
getDepth in class Directory
Returns:
the level of this directory in the directory tree. 0 for the root.
See Also:
Directory.getDepth()