Пример #1
0
        public override bool Equals(System.Object o)
        {
            if (o is XPathStep)
            {
                XPathStep x = (XPathStep)o;

                //shortcuts for faster evaluation
                if (axis != x.axis || test != x.test || predicates.Length != x.predicates.Length)
                {
                    return(false);
                }

                switch (test)
                {
                case TEST_NAME:  if (!name.Equals(x.name))
                    {
                        return(false);
                    }
                    break;

                case TEST_NAMESPACE_WILDCARD:  if (!namespace_Renamed.Equals(x.namespace_Renamed))
                    {
                        return(false);
                    }
                    break;

                case TEST_TYPE_PROCESSING_INSTRUCTION:  if (!ExtUtil.equals(literal, x.literal))
                    {
                        return(false);
                    }
                    break;

                default:  break;
                }

                return(ExtUtil.arrayEquals(predicates, x.predicates));
            }
            else
            {
                return(false);
            }
        }
Пример #2
0
 public override bool Equals(System.Object o)
 {
     if (o is XPathVariableReference)
     {
         XPathVariableReference x = (XPathVariableReference)o;
         return(id.Equals(x.id));
     }
     else
     {
         return(false);
     }
 }
Пример #3
0
        public Boolean Equals(Object o)
        {
            if (o is XPathFuncExpr)
            {
                XPathFuncExpr x = (XPathFuncExpr)o;

                //Shortcuts for very easily comprable values
                if (!id.Equals(x.id) || args.Length != x.args.Length)
                {
                    return(false);
                }

                return(ExtUtil.arrayEquals(args, x.args));
            }
            else
            {
                return(false);
            }
        }