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: import java.util.Vector;
14:
15: public class Property {
16:
17: /*
18: * - name <- String - value <- vector of Strings
19: */
20: private String name;
21:
22: private Vector value;
23:
24: public Property(String name, Vector value) {
25: for (int i = 0; i < value.size(); i++) {
26: if (!(value.elementAt(i) instanceof String)) {
27: System.err.println("Error in Property.Property");
28:
29: return;
30: }
31: }
32:
33: this .value = value;
34: this .name = name;
35: }
36:
37: public String toString() {
38: return name + " = " + value;
39: }
40:
41: public int size() {
42: return value.size();
43: }
44:
45: public String getName() {
46: return name;
47: }
48:
49: public String getValue(int i) {
50: if ((i >= 0) && (i < value.size())) {
51: return (String) value.elementAt(i);
52: }
53:
54: return null;
55: }
56:
57: public String getValue() {
58: return (String) value.elementAt(0);
59: }
60: }
|