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 PIParameterBoolean extends PIParameter {
14:
15: private Boolean value;
16:
17: public PIParameterBoolean(String internalName, String name,
18: boolean value) {
19: super (internalName, name);
20: setValue(value);
21: }
22:
23: public PIParameterBoolean(String internalName, String name,
24: Boolean value) {
25: super (internalName, name);
26: setValue(value);
27: }
28:
29: public PIParameterBoolean(String internalName, String name,
30: String value) {
31: super (internalName, name);
32: setValue(value);
33: }
34:
35: public String getValue() {
36: return value.toString();
37: }
38:
39: public void setValue(Boolean value) {
40: this .value = value;
41:
42: //System.out.println("Boolean -
43: // setValue(Boolean)\t"+getInternalName()+"\t"+getValue());
44: setChanged();
45: notifyObservers(this );
46: }
47:
48: public void setValue(boolean value) {
49: setValue(new Boolean(value));
50: }
51:
52: public void setValue(String value) {
53: //System.out.println("setting boolean value to "+value);
54: setValue(value.equals("true"));
55: }
56: }
|