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: //
10:
11: package de.uka.ilkd.key.casetool.patternimplementor;
12:
13: public class PIParameterMultiString extends PIParameterString {
14:
15: private MultiString value;
16:
17: public PIParameterMultiString(String internalName, String name,
18: String value) {
19: this (internalName, name, MultiString.parse(value));
20: }
21:
22: public PIParameterMultiString(String internalName, String name,
23: MultiString value) {
24: super (internalName, name);
25: this .value = value;
26: }
27:
28: public String getValue() {
29: //System.out.println("Trying to get one String from MultiString");
30: return value.toString();
31: }
32:
33: public String[] getValues() {
34: String[] values = new String[value.size()];
35:
36: for (int i = 0; i < value.size(); i++) {
37: values[i] = value.get(i);
38: }
39:
40: return values;
41: }
42:
43: public MultiString getMultiString() {
44: return value;
45: }
46:
47: public void setValue(String value) {
48: //System.out.println("MultiString.setValue");
49: this .value = MultiString.parse(value);
50:
51: //System.out.println("MultiString -
52: // setValue(String)\t"+getInternalName()+"\t"+this.value);
53: setChanged();
54: notifyObservers(this );
55: }
56:
57: public int size() {
58: return value.size();
59: }
60: }
|