jaxp/src/com/sun/org/apache/xpath/internal/Arg.java
Print this page
@@ -22,10 +22,11 @@
*/
package com.sun.org.apache.xpath.internal;
import com.sun.org.apache.xml.internal.utils.QName;
import com.sun.org.apache.xpath.internal.objects.XObject;
+import java.util.Objects;
/**
* This class holds an instance of an argument on
* the stack. The value of the argument can be either an
* XObject or a String containing an expression.
@@ -180,11 +181,11 @@
*/
public Arg()
{
m_qname = new QName("");
- ; // so that string compares can be done.
+ // so that string compares can be done.
m_val = null;
m_expression = null;
m_isVisible = true;
m_isFromWithParam = false;
}
@@ -221,18 +222,24 @@
m_isVisible = true;
m_isFromWithParam = false;
m_expression = null;
}
+ @Override
+ public int hashCode() {
+ return Objects.hashCode(this.m_qname);
+ }
+
/**
* Equality function specialized for the variable name. If the argument
* is not a qname, it will deligate to the super class.
*
* @param obj the reference object with which to compare.
* @return <code>true</code> if this object is the same as the obj
* argument; <code>false</code> otherwise.
*/
+ @Override
public boolean equals(Object obj)
{
if(obj instanceof QName)
{
return m_qname.equals(obj);