Ejemplo n.º 1
0
        public override object Clone()
        {
            SpanPayloadCheckQuery result = new SpanPayloadCheckQuery((SpanQuery)m_match.Clone(), m_payloadToMatch);

            result.Boost = Boost;
            return(result);
        }
Ejemplo n.º 2
0
        public override bool Equals(object o)
        {
            if (this == o)
            {
                return(true);
            }
            if (!(o is SpanPayloadCheckQuery))
            {
                return(false);
            }

            SpanPayloadCheckQuery other = (SpanPayloadCheckQuery)o;

            // LUCENENET NOTE: Need to call Collections.Equals() to compare equality of all contained values
            return(Collections.Equals(this.m_payloadToMatch, other.m_payloadToMatch) &&
                   this.m_match.Equals(other.m_match) &&
                   this.Boost == other.Boost);
        }
Ejemplo n.º 3
0
        public override bool Equals(object o)
        {
            if (this == o)
            {
                return(true);
            }
            if (!(o is SpanPayloadCheckQuery))
            {
                return(false);
            }

            SpanPayloadCheckQuery other = (SpanPayloadCheckQuery)o;

            // LUCENENET NOTE: Need to use the structural equality comparer to compare equality of all contained values
            return(payloadEqualityComparer.Equals(this.m_payloadToMatch, other.m_payloadToMatch) &&
                   this.m_match.Equals(other.m_match)
                   // LUCENENET specific - compare bits rather than using equality operators to prevent these comparisons from failing in x86 in .NET Framework with optimizations enabled
                   && NumericUtils.SingleToSortableInt32(this.Boost) == NumericUtils.SingleToSortableInt32(other.Boost));
        }