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: /**
12: * this class represents a heuristic. Taclets can belong to different
13: * heuristics and are executed automatic if these are selected. A
14: * heuristic is just a name.
15: */package de.uka.ilkd.key.rule;
16:
17: import de.uka.ilkd.key.logic.Name;
18: import de.uka.ilkd.key.logic.Named;
19:
20: public class RuleSet implements Named {
21: /** name of the heuristic */
22: private Name name;
23:
24: /** creates a heuristic
25: * @param name Name object that contains name of the heuristic
26: */
27: public RuleSet(Name name) {
28: this .name = name;
29: }
30:
31: /** gets name of the heuristic
32: * @return Name object that is the name of the heuristic
33: */
34: public Name name() {
35: return name;
36: }
37:
38: public int hashCode() {
39: return 3 * name().hashCode();
40: }
41:
42: /**
43: * returns true it the o is the same object as this
44: */
45: public boolean equals(Object o) {
46: if (o instanceof RuleSet) {
47: return this .name().equals(((RuleSet) o).name());
48: }
49: return false;
50: }
51:
52: /** toString */
53: public String toString() {
54: return name.toString();
55: }
56: }
|