01: // This file is part of KeY - Integrated Deductive Software Design
02: // Copyright (C) 2001-2007 Universitaet Karlsruhe, Germany
03: // Universitaet Koblenz-Landau, Germany
04: // Chalmers University of Technology, Sweden
05: //
06: // The KeY system is protected by the GNU General Public License.
07: // See LICENSE.TXT for details.
08: //
09: package de.uka.ilkd.key.casetool.patternimplementor;
10:
11: public class PIParameterGroup extends PIParameter {
12:
13: protected PIParameters group;
14:
15: public PIParameterGroup(String internalName, String name) {
16: super (internalName, name);
17: this .group = new PIParameters();
18: }
19:
20: public String getValue(int i) {
21: return group.get(i).getValue();
22: }
23:
24: public String[][] getValues() {
25: String[][] values = new String[size()][];
26:
27: for (int i = 0; i < size(); i++) {
28: String[] tmp = ((PIParameterMultiString) group.get(i))
29: .getValues();
30: values[i] = tmp;
31: }
32:
33: return values;
34: }
35:
36: public void add(PIParameter pip) {
37: group.add(pip);
38: }
39:
40: public int size() {
41: return group.size();
42: }
43:
44: public PIParameter get(int i) {
45: return group.get(i);
46: }
47:
48: public PIParameter get(String internalName) {
49: PIParameter tmp = group.get(internalName);
50:
51: //System.out.println(internalName + " getting "+tmp + " from
52: // "+getInternalName());
53: return tmp;
54: }
55:
56: public String toString() {
57: String retval = new String();
58:
59: /*
60: * retval = "internalName = "+getInternalName() + "\n"; retval = retval +
61: * "name = " + getName() +"\n";
62: */
63: retval = retval + group;
64:
65: return retval;
66: }
67: }
|