1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.qedeq.kernel.bo.logic.common;
17
18 import org.qedeq.base.utility.EqualsUtility;
19
20
21
22
23
24
25 public final class PredicateKey {
26
27
28 private String name;
29
30
31 private String arguments;
32
33
34
35
36
37
38
39 public PredicateKey(final String name, final String arguments) {
40 this.name = name;
41 this.arguments = arguments;
42 }
43
44
45
46
47
48
49 public String getName() {
50 return name;
51 }
52
53
54
55
56
57
58 public String getArguments() {
59 return arguments;
60 }
61
62 public int hashCode() {
63 return (getName() != null ? getName().hashCode() : 0)
64 ^ (getArguments() != null ? getArguments().hashCode() : 0);
65 }
66
67 public boolean equals(final Object obj) {
68 if (!(obj instanceof PredicateKey)) {
69 return false;
70 }
71 final PredicateKey other = (PredicateKey) obj;
72 return EqualsUtility.equals(getName(), other.getName())
73 && EqualsUtility.equals(getArguments(), other.getArguments());
74 }
75
76 public String toString() {
77 return getName() + "[" + getArguments() + "]";
78 }
79
80 }