View Javadoc

1   package org.catacomb.druid.build;
2   
3   
4   public class GUIPath {
5   
6   
7       public String path;
8   
9       boolean unique;
10  
11  
12      public GUIPath() {
13          this("");
14      }
15  
16  
17      public GUIPath(String psf) {
18          path = psf;
19          unique = false;
20      }
21  
22  
23      public GUIPath(String psf, String id) {
24          if (psf != null && psf.length() > 0) {
25              path = psf + "." + id;
26          } else {
27              path = id;
28          }
29          unique = true;
30      }
31  
32  
33      public String toString() {
34          return path;
35      }
36  
37  
38      public boolean isUnique() {
39          return unique;
40      }
41  
42  
43      public String getPath() {
44          return path;
45      }
46  
47  
48      public GUIPath extend(String id) {
49          GUIPath ret = null;
50  
51          if (id != null && id.length() > 0) {
52              ret = new GUIPath(path, id);
53          } else {
54              ret = new GUIPath(path);
55              // could return this instead of a new one if could handle unique flag EFF
56          }
57          return ret;
58      }
59  
60  }