1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 package net.sf.statcvs.model;
24
25 /**
26 * The root of a tree of <tt>Directory</tt> objects. To create an instance
27 * of this class, call {@link Directory#createRoot}.
28 *
29 * @author Richard Cyganiak <richard@cyganiak.de>
30 * @version $Id: DirectoryRoot.java,v 1.4 2008/04/02 11:22:16 benoitx Exp $
31 */
32 class DirectoryRoot extends Directory {
33
34 /**
35 * Use {@link Directory#createRoot} to construct instances of this class.
36 *
37 */
38 DirectoryRoot() {
39
40 }
41
42 /**
43 * @see net.sf.statcvs.model.Directory#getName()
44 */
45 public String getName() {
46 return "";
47 }
48
49 /**
50 * @see net.sf.statcvs.model.Directory#getPath()
51 */
52 public String getPath() {
53 return "";
54 }
55
56 /**
57 * @see net.sf.statcvs.model.Directory#getParent()
58 */
59 public Directory getParent() {
60 return null;
61 }
62
63 /**
64 * @see net.sf.statcvs.model.Directory#isRoot()
65 */
66 public boolean isRoot() {
67 return true;
68 }
69
70 /**
71 * @see java.lang.Object#toString()
72 */
73 public String toString() {
74 return "root directory";
75 }
76
77 /**
78 * @see net.sf.statcvs.model.Directory#getDepth()
79 */
80 public int getDepth() {
81 return 0;
82 }
83 }