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-2003 Universitaet Karlsruhe, Germany
10: // and Chalmers University of Technology, Sweden
11: //
12: //The KeY system is protected by the GNU General Public License.
13: //See LICENSE.TXT for details.
14: //
15:
16: package de.uka.ilkd.key.rule.export;
17:
18: import de.uka.ilkd.key.logic.Name;
19: import de.uka.ilkd.key.logic.Named;
20:
21: public class CategoryModelInfo implements Named, Comparable {
22: private Name name;
23: private ListOfOptionModelInfo options = SLListOfOptionModelInfo.EMPTY_LIST;
24:
25: public CategoryModelInfo(String category) {
26: name = new Name(category);
27: }
28:
29: public void addOption(OptionModelInfo opt) {
30: if (!options.contains(opt)) {
31: options = options.prepend(opt);
32: }
33: }
34:
35: public void setOptions(ListOfOptionModelInfo p_options) {
36: this .options = p_options;
37: }
38:
39: public ListOfOptionModelInfo getOptions() {
40: return options;
41: }
42:
43: public Name name() {
44: return name;
45: }
46:
47: public String toString() {
48: return name.toString();
49: }
50:
51: public int compareTo(Object other) {
52: return name.compareTo(((CategoryModelInfo) other).name);
53: }
54: }
|