diff options
| author | Constantin Jucovschi <cj@ubuntu.localdomain> | 2009-03-31 06:18:54 -0400 |
|---|---|---|
| committer | Constantin Jucovschi <cj@ubuntu.localdomain> | 2009-03-31 06:18:54 -0400 |
| commit | 0f1055b8d7f97d86c66fa602c17666bc2ff9c437 (patch) | |
| tree | 9c68fa99a97063bbe4a4231e04fc09329541ac71 /src/grammar/CrsList.java | |
Initial commit
Diffstat (limited to 'src/grammar/CrsList.java')
| -rw-r--r-- | src/grammar/CrsList.java | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/grammar/CrsList.java b/src/grammar/CrsList.java new file mode 100644 index 0000000..0d148fa --- /dev/null +++ b/src/grammar/CrsList.java @@ -0,0 +1,41 @@ +package grammar; + +import java.util.*; + +/** CrsList + * + * @author Andrei Aiordachioaie + */ +public class CrsList implements IParseTreeNode +{ + LinkedList<String> list; + + public CrsList(String crs) + { + list = new LinkedList<String>(); + list.add(crs); + } + + public CrsList() + { + list = new LinkedList<String>(); + } + + public void add(String crs) + { + list.add(crs); + } + + public String toXML() + { + String result = ""; + Iterator<String> it = list.iterator(); + while (it.hasNext()) + { + result += "<crs>" + it.next() + "</crs>"; + } + + return result; + } + +} |
