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: //This file is part of KeY - Integrated Deductive Software Design
09: //Copyright (C) 2001-2005 Universitaet Karlsruhe, Germany
10: // Universitaet Koblenz-Landau, Germany
11: // Chalmers University of Technology, Sweden
12: //
13: //The KeY system is protected by the GNU General Public License.
14: //See LICENSE.TXT for details.
15: //
16: //
17:
18: package de.uka.ilkd.key.parser.ocl;
19:
20: import de.uka.ilkd.key.logic.op.IteratorOfLogicVariable;
21: import de.uka.ilkd.key.logic.op.ListOfLogicVariable;
22: import de.uka.ilkd.key.util.Debug;
23:
24: class OCLParameters {
25: private final ListOfLogicVariable declaredVars;
26: private final ListOfOCLEntity entities;
27:
28: public OCLParameters(ListOfLogicVariable declaredVars,
29: ListOfOCLEntity entities) {
30: Debug.assertTrue(declaredVars != null);
31: Debug.assertTrue(entities != null);
32: this .declaredVars = declaredVars;
33: this .entities = entities;
34: }
35:
36: public ListOfOCLEntity getEntities() {
37: return entities;
38: }
39:
40: public ListOfLogicVariable getDeclaredVars() {
41: return declaredVars;
42: }
43:
44: public String toString() {
45: String result = "(";
46:
47: IteratorOfLogicVariable it = declaredVars.iterator();
48: while (it.hasNext()) {
49: result += it.next() + ",";
50: }
51: if (!declaredVars.isEmpty()) {
52: result = result.substring(0, result.length() - 1) + "|";
53: }
54:
55: IteratorOfOCLEntity it2 = entities.iterator();
56: while (it2.hasNext()) {
57: result += it2.next() + ",";
58: }
59: if (!entities.isEmpty()) {
60: result = result.substring(0, result.length() - 1);
61: }
62:
63: return result + ")";
64: }
65: }
|