Parent Directory | Revision Log | Patch
revision 1.4 by rabbit78, Sun May 22 19:46:19 2005 UTC | revision 1.5 by rabbit78, Sun May 22 19:53:38 2005 UTC | |
---|---|---|
# | Line 287 public class TreePath implements Seriali | Line 287 public class TreePath implements Seriali |
287 | */ | */ |
288 | public TreePath getParentPath() | public TreePath getParentPath() |
289 | { | { |
290 | // If this path has only one element, then we return null. That | |
291 | // is what the JDK does. | |
292 | if (path.length <= 1) | |
293 | return null; | |
294 | ||
295 | return new TreePath(this.getPath(), path.length - 1); | return new TreePath(this.getPath(), path.length - 1); |
296 | } | } |
297 | } | } |
|
savannah-hackers-public@gnu.org | ViewVC Help |
Powered by ViewVC 1.1.26 |