1 package org.catacomb.util;
2
3 import org.catacomb.interlish.structure.TreeNode;
4
5
6 public class StringTreeLeaf implements TreeNode {
7
8 String label;
9
10 TreeNode parent;
11
12 public StringTreeLeaf(String lab) {
13 label = lab;
14 }
15
16 public String toString() {
17 return label;
18 }
19
20
21 public void setParent(TreeNode p) {
22 parent = p;
23 }
24
25 public Object getParent() {
26 return parent;
27 }
28
29 public int getChildCount() {
30 return 0;
31 }
32
33 public Object getChild(int index) {
34 return null;
35 }
36
37 public int getIndexOfChild(Object child) {
38 return -1;
39 }
40
41 public boolean isLeaf() {
42 return true;
43 }
44
45 public String getLabel() {
46 return label;
47 }
48
49 }