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: // This file is part of KeY - Integrated Deductive Software Design
10: // Copyright (C) 2001-2004 Universitaet Karlsruhe, Germany
11: // Universitaet Koblenz-Landau, Germany
12: // Chalmers University of Technology, Sweden
13: //
14: // The KeY system is protected by the GNU General Public License.
15: // See LICENSE.TXT for details.
16: package de.uka.ilkd.key.casetool;
17:
18: import java.util.HashMap;
19: import java.util.Iterator;
20:
21: /**
22: * @deprecated
23: */
24: public class HashMapOfClassifier extends HashMap {
25:
26: public HashMapOfClassifier() {
27: super ();
28: }
29:
30: public void putClassifier(String name, UMLOCLClassifier classifier) {
31: put(name, classifier);
32: }
33:
34: public UMLOCLClassifier getClassifier(String name) {
35: return (UMLOCLClassifier) get(name);
36: }
37:
38: public UMLOCLClassifier getClassifierByFullName(String name) {
39: Iterator it = this .values().iterator();
40: UMLOCLClassifier cls;
41: while (it.hasNext()) {
42: cls = (UMLOCLClassifier) it.next();
43: if (cls.getFullName().equals(name))
44: return cls;
45: }
46: return null;
47: }
48:
49: public String toString() {
50: Iterator it = keySet().iterator();
51: StringBuffer result = new StringBuffer();
52: result.append("\n--------------------------------\n");
53: while (it.hasNext()) {
54: result.append("key: " + it.next() + "\n");
55: }
56: result.append("\n--------------------------------\n");
57: return result.toString();
58: }
59:
60: }
|