equal
deleted
inserted
replaced
22 */ |
22 */ |
23 package com.sun.org.apache.xpath.internal; |
23 package com.sun.org.apache.xpath.internal; |
24 |
24 |
25 import com.sun.org.apache.xml.internal.utils.QName; |
25 import com.sun.org.apache.xml.internal.utils.QName; |
26 import com.sun.org.apache.xpath.internal.objects.XObject; |
26 import com.sun.org.apache.xpath.internal.objects.XObject; |
|
27 import java.util.Objects; |
27 |
28 |
28 /** |
29 /** |
29 * This class holds an instance of an argument on |
30 * This class holds an instance of an argument on |
30 * the stack. The value of the argument can be either an |
31 * the stack. The value of the argument can be either an |
31 * XObject or a String containing an expression. |
32 * XObject or a String containing an expression. |
180 */ |
181 */ |
181 public Arg() |
182 public Arg() |
182 { |
183 { |
183 |
184 |
184 m_qname = new QName(""); |
185 m_qname = new QName(""); |
185 ; // so that string compares can be done. |
186 // so that string compares can be done. |
186 m_val = null; |
187 m_val = null; |
187 m_expression = null; |
188 m_expression = null; |
188 m_isVisible = true; |
189 m_isVisible = true; |
189 m_isFromWithParam = false; |
190 m_isFromWithParam = false; |
190 } |
191 } |
221 m_isVisible = true; |
222 m_isVisible = true; |
222 m_isFromWithParam = false; |
223 m_isFromWithParam = false; |
223 m_expression = null; |
224 m_expression = null; |
224 } |
225 } |
225 |
226 |
|
227 @Override |
|
228 public int hashCode() { |
|
229 return Objects.hashCode(this.m_qname); |
|
230 } |
|
231 |
226 /** |
232 /** |
227 * Equality function specialized for the variable name. If the argument |
233 * Equality function specialized for the variable name. If the argument |
228 * is not a qname, it will deligate to the super class. |
234 * is not a qname, it will deligate to the super class. |
229 * |
235 * |
230 * @param obj the reference object with which to compare. |
236 * @param obj the reference object with which to compare. |
231 * @return <code>true</code> if this object is the same as the obj |
237 * @return <code>true</code> if this object is the same as the obj |
232 * argument; <code>false</code> otherwise. |
238 * argument; <code>false</code> otherwise. |
233 */ |
239 */ |
|
240 @Override |
234 public boolean equals(Object obj) |
241 public boolean equals(Object obj) |
235 { |
242 { |
236 if(obj instanceof QName) |
243 if(obj instanceof QName) |
237 { |
244 { |
238 return m_qname.equals(obj); |
245 return m_qname.equals(obj); |