title: String path to a tree data structure (GWT)
body: <p>My challenge is this... I'm getting a string path (e.g x1/x2/x3/Xn, Xn/x2/x3, etc.) (e.g String path = Project.getName() ). So basically, I can have any type of path <strong>(any level and any depth)</strong>. I'm trying to find a way to convert this to a data structure so I can implement it in my gwt CellTree. So far, I have implemented the CellTree from this example <a href="https://stackoverflow.com/questions/4396459/gwt-cell-tree-how-to-use">GWT Cell tree, how to use?</a> .</p>
  
  <p>Since, I have no idea of the level or the depth, I am a bit lost... I think I should go with a recursive function which split my string path then add them, but check if they already existe, etc...</p>
  
  <p>I also looked over this question <a href="https://stackoverflow.com/questions/1005551/construct-a-tree-structure-from-list-of-string-paths">Construct a tree structure from list of string paths</a>. But I'm kind of new to java and design patterns, so any pointers or bits of code (example) would help. </p>