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/RangeConstructorExpr.java | |
Initial commit
Diffstat (limited to 'src/grammar/RangeConstructorExpr.java')
| -rw-r--r-- | src/grammar/RangeConstructorExpr.java | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/grammar/RangeConstructorExpr.java b/src/grammar/RangeConstructorExpr.java new file mode 100644 index 0000000..44303d5 --- /dev/null +++ b/src/grammar/RangeConstructorExpr.java @@ -0,0 +1,41 @@ +package grammar; + +import java.util.*; + +/** RangeConstructorExpr + * + * @author Andrei Aiordachioaie + */ +public class RangeConstructorExpr implements IParseTreeNode +{ + LinkedList<RangeConstructorTerm> list; + + public RangeConstructorExpr() + { + list = new LinkedList(); + } + + public RangeConstructorExpr(String field, CoverageExpr expr) + { + this(); + add(field, expr); + } + + public void add(String field, CoverageExpr expr) + { + list.add(new RangeConstructorTerm(field, expr)); + } + + public String toXML() + { + String result = ""; + Iterator<RangeConstructorTerm> it = list.iterator(); + + while (it.hasNext()) + result += it.next().toXML(); + + result = "<rangeConstructor>" + result + "</rangeConstructor>"; + return result; + } + +} |
