|
1 |
| |
|
2 |
| |
|
3 |
| |
|
4 |
| |
|
5 |
| |
|
6 |
| |
|
7 |
| |
|
8 |
| |
|
9 |
| |
|
10 |
| |
|
11 |
| |
|
12 |
| |
|
13 |
| |
|
14 |
| |
|
15 |
| |
|
16 |
| |
|
17 |
| |
|
18 |
| package org.qedeq.kernel.dto.module; |
|
19 |
| |
|
20 |
| import org.qedeq.kernel.base.module.Axiom; |
|
21 |
| import org.qedeq.kernel.base.module.FunctionDefinition; |
|
22 |
| import org.qedeq.kernel.base.module.LatexList; |
|
23 |
| import org.qedeq.kernel.base.module.PredicateDefinition; |
|
24 |
| import org.qedeq.kernel.base.module.Proposition; |
|
25 |
| import org.qedeq.kernel.base.module.Rule; |
|
26 |
| import org.qedeq.kernel.base.module.Term; |
|
27 |
| import org.qedeq.kernel.base.module.VariableList; |
|
28 |
| import org.qedeq.kernel.utility.EqualsUtility; |
|
29 |
| |
|
30 |
| |
|
31 |
| |
|
32 |
| |
|
33 |
| |
|
34 |
| |
|
35 |
| |
|
36 |
| |
|
37 |
| |
|
38 |
| public final class FunctionDefinitionVo implements FunctionDefinition { |
|
39 |
| |
|
40 |
| |
|
41 |
| private String argumentNumber; |
|
42 |
| |
|
43 |
| |
|
44 |
| private String name; |
|
45 |
| |
|
46 |
| |
|
47 |
| |
|
48 |
| |
|
49 |
| private String latexPattern; |
|
50 |
| |
|
51 |
| |
|
52 |
| |
|
53 |
| private VariableList variableList; |
|
54 |
| |
|
55 |
| |
|
56 |
| private Term term; |
|
57 |
| |
|
58 |
| |
|
59 |
| private LatexList description; |
|
60 |
| |
|
61 |
| |
|
62 |
| |
|
63 |
| |
|
64 |
155
| public FunctionDefinitionVo() {
|
|
65 |
| |
|
66 |
| } |
|
67 |
| |
|
68 |
0
| public Axiom getAxiom() {
|
|
69 |
0
| return null;
|
|
70 |
| } |
|
71 |
| |
|
72 |
0
| public PredicateDefinition getPredicateDefinition() {
|
|
73 |
0
| return null;
|
|
74 |
| } |
|
75 |
| |
|
76 |
172
| public FunctionDefinition getFunctionDefinition() {
|
|
77 |
172
| return this;
|
|
78 |
| } |
|
79 |
| |
|
80 |
0
| public Proposition getProposition() {
|
|
81 |
0
| return null;
|
|
82 |
| } |
|
83 |
| |
|
84 |
0
| public Rule getRule() {
|
|
85 |
0
| return null;
|
|
86 |
| } |
|
87 |
| |
|
88 |
| |
|
89 |
| |
|
90 |
| |
|
91 |
| |
|
92 |
| |
|
93 |
112
| public final void setArgumentNumber(final String argumentNumber) {
|
|
94 |
112
| this.argumentNumber = argumentNumber;
|
|
95 |
| } |
|
96 |
| |
|
97 |
511
| public final String getArgumentNumber() {
|
|
98 |
511
| return argumentNumber;
|
|
99 |
| } |
|
100 |
| |
|
101 |
| |
|
102 |
| |
|
103 |
| |
|
104 |
| |
|
105 |
| |
|
106 |
| |
|
107 |
112
| public void setName(final String name) {
|
|
108 |
112
| this.name = name;
|
|
109 |
| } |
|
110 |
| |
|
111 |
535
| public String getName() {
|
|
112 |
535
| return name;
|
|
113 |
| } |
|
114 |
| |
|
115 |
| |
|
116 |
| |
|
117 |
| |
|
118 |
| |
|
119 |
| |
|
120 |
| |
|
121 |
| |
|
122 |
112
| public final void setLatexPattern(final String latexPattern) {
|
|
123 |
112
| this.latexPattern = latexPattern;
|
|
124 |
| } |
|
125 |
| |
|
126 |
933
| public final String getLatexPattern() {
|
|
127 |
933
| return latexPattern;
|
|
128 |
| } |
|
129 |
| |
|
130 |
| |
|
131 |
| |
|
132 |
| |
|
133 |
| |
|
134 |
| |
|
135 |
| |
|
136 |
94
| public final void setVariableList(final VariableListVo variables) {
|
|
137 |
94
| this.variableList = variables;
|
|
138 |
| } |
|
139 |
| |
|
140 |
514
| public final VariableList getVariableList() {
|
|
141 |
514
| return variableList;
|
|
142 |
| } |
|
143 |
| |
|
144 |
| |
|
145 |
| |
|
146 |
| |
|
147 |
| |
|
148 |
| |
|
149 |
112
| public final void setTerm(final TermVo term) {
|
|
150 |
112
| this.term = term;
|
|
151 |
| } |
|
152 |
| |
|
153 |
643
| public final Term getTerm() {
|
|
154 |
643
| return term;
|
|
155 |
| } |
|
156 |
| |
|
157 |
| |
|
158 |
| |
|
159 |
| |
|
160 |
| |
|
161 |
| |
|
162 |
16
| public final void setDescription(final LatexListVo description) {
|
|
163 |
16
| this.description = description;
|
|
164 |
| } |
|
165 |
| |
|
166 |
419
| public LatexList getDescription() {
|
|
167 |
419
| return description;
|
|
168 |
| } |
|
169 |
| |
|
170 |
81
| public boolean equals(final Object obj) {
|
|
171 |
81
| if (!(obj instanceof FunctionDefinition)) {
|
|
172 |
8
| return false;
|
|
173 |
| } |
|
174 |
73
| final FunctionDefinition other = (FunctionDefinition) obj;
|
|
175 |
73
| return EqualsUtility.equals(getArgumentNumber(), other.getArgumentNumber())
|
|
176 |
| && EqualsUtility.equals(getName(), other.getName()) |
|
177 |
| && EqualsUtility.equals(getLatexPattern(), other.getLatexPattern()) |
|
178 |
| && EqualsUtility.equals(getVariableList(), other.getVariableList()) |
|
179 |
| && EqualsUtility.equals(getTerm(), other.getTerm()) |
|
180 |
| && EqualsUtility.equals(getDescription(), other.getDescription()); |
|
181 |
| } |
|
182 |
| |
|
183 |
92
| public int hashCode() {
|
|
184 |
92
| return (getArgumentNumber() != null ? getArgumentNumber().hashCode() : 0)
|
|
185 |
92
| ^ (getName() != null ? 1 ^ getName().hashCode() : 0)
|
|
186 |
92
| ^ (getLatexPattern() != null ? 2 ^ getLatexPattern().hashCode() : 0)
|
|
187 |
92
| ^ (getVariableList() != null ? 3 ^ getVariableList().hashCode() : 0)
|
|
188 |
92
| ^ (getTerm() != null ? 4 ^ getTerm().hashCode() : 0)
|
|
189 |
92
| ^ (getDescription() != null ? 5 ^ getDescription().hashCode() : 0);
|
|
190 |
| } |
|
191 |
| |
|
192 |
58
| public String toString() {
|
|
193 |
58
| final StringBuffer buffer = new StringBuffer();
|
|
194 |
58
| buffer.append("Function Definition arguments=" + getArgumentNumber() + "\n");
|
|
195 |
58
| buffer.append("\tname=" + getName() + "\n");
|
|
196 |
58
| buffer.append("\tpattern=" + getLatexPattern() + "\n");
|
|
197 |
58
| buffer.append("\tvariables=" + getVariableList() + "\n");
|
|
198 |
58
| buffer.append("\tformula/term:\n" + getTerm() + "\n");
|
|
199 |
58
| buffer.append("\tdescription:\n" + getDescription() + "\n");
|
|
200 |
58
| return buffer.toString();
|
|
201 |
| } |
|
202 |
| |
|
203 |
| } |