1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 package net.sf.maventaglib.checker;
25
26 import org.apache.commons.lang3.builder.CompareToBuilder;
27 import org.apache.commons.lang3.builder.EqualsBuilder;
28 import org.apache.commons.lang3.builder.HashCodeBuilder;
29
30
31
32
33
34
35 public class ELFunction extends TldItem
36 {
37
38 private String functionClass;
39
40 private String functionSignature;
41
42 private String parameters;
43
44
45
46
47
48 public String getFunctionClass()
49 {
50 return functionClass;
51 }
52
53
54
55
56
57 public void setFunctionClass(String functionClass)
58 {
59 this.functionClass = functionClass;
60 }
61
62
63
64
65
66 public String getFunctionSignature()
67 {
68 return functionSignature;
69 }
70
71
72
73
74
75 public void setFunctionSignature(String functionSignature)
76 {
77 this.functionSignature = functionSignature;
78 }
79
80
81
82
83
84 public String getParameters()
85 {
86 return parameters;
87 }
88
89
90
91
92
93 public void setParameters(String parameters)
94 {
95 this.parameters = parameters;
96 }
97
98
99
100
101 @Override
102 public int compareTo(TldItem object)
103 {
104 int ret = super.compareTo(object);
105 if (ret != 0) {
106 return ret;
107 }
108
109 ELFunction rhs = (ELFunction) object;
110 return new CompareToBuilder()
111 .append(this.functionClass, rhs.functionClass)
112 .append(this.functionSignature, rhs.functionSignature)
113 .append(this.parameters, rhs.parameters)
114 .toComparison();
115 }
116
117
118
119
120 @Override
121 public boolean equals(Object obj)
122 {
123 if(obj == null || !super.equals(obj))
124 {
125 return false;
126 }
127
128 ELFunction rhs = (ELFunction) obj;
129 return new EqualsBuilder()
130 .append(this.functionClass, rhs.functionClass)
131 .append(this.functionSignature, rhs.functionSignature)
132 .append(this.parameters, rhs.parameters)
133 .isEquals();
134 }
135
136
137
138
139 @Override
140 public int hashCode() {
141 return new HashCodeBuilder()
142 .appendSuper(super.hashCode())
143 .append(this.functionClass)
144 .append(this.functionSignature)
145 .append(this.parameters)
146 .toHashCode();
147 }
148
149 }