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.together.patterns.HelperClasses.MyParser;
12:
13: public class Entry {
14:
15: String oclScheme;
16: String property;
17: String name;
18: String propertyName;
19:
20: public Entry(String a, String b, String c, String d) {
21: this .oclScheme = a;
22: this .property = b;
23: this .name = c;
24: this .propertyName = d;
25: }
26:
27: public boolean equals(Object o) {
28: if (o instanceof Entry) {
29: Entry e = (Entry) o;
30: if ((this .property.equals(e.property))
31: && (this .name.equals(e.name))
32: && (this .propertyName.equals(e.propertyName))
33: && (this .oclScheme.equals(e.oclScheme)))
34: return true;
35: else
36: return false;
37: } else
38: return false;
39: }
40:
41: public int hashCode() {
42: int hash = 0;
43: if (oclScheme != null)
44: hash += oclScheme.hashCode();
45: if (property != null)
46: hash += property.hashCode();
47: if (propertyName != null)
48: hash += propertyName.hashCode();
49: if (name != null)
50: hash += name.hashCode();
51: return hash;
52: }
53:
54: public String getOclSchemeName() {
55: return this .oclScheme;
56: }
57:
58: public String getProperty() {
59: return this .property;
60: }
61:
62: public String getName() {
63: return this .name;
64: }
65:
66: public String getPropertyName() {
67: return this .propertyName;
68: }
69:
70: public String toString() {
71: return (this .property + "; " + this .name + "; "
72: + this .propertyName + "\n");
73: }
74:
75: }
|