//Equal determines whether or not v and other contain the exact same set of
//Keys and associated values.
//Comparison on a value by value basis is done with the == operator.
551318
func (v *Values) Equal(other *Values) bool {
	v.lock.RLock()
	defer v.lock.RUnlock()
	other.lock.RLock()
	defer other.lock.RUnlock()

	return v.root.equal(other.root)
}
561872
func (k Key) Equal(k2 Key) bool {
	return k.string == k2.string
}
982359
func (v *KeyValue_SetValue_Args) Equals(rhs *KeyValue_SetValue_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !_String_EqualsPtr(v.Key, rhs.Key) {
		return false
	}
	if !_String_EqualsPtr(v.Value, rhs.Value) {
		return false
	}

	return true
}
411135
func Equal(left Value, right Value) bool {
	// TODO: Stop-gap for now, this will need to be much more sophisticated.
	return CoerceString(left) == CoerceString(right)
}
972344
func (b *BitSet) Equal(c *BitSet) bool {
	if c == nil {
		return false
	}
	if b.length != c.length {
		return false
	}
	if b.length == 0 { // if they have both length == 0, then could have nil set
		return true
	}
	// testing for equality shoud not transform the bitset (no call to safeSet)

	for p, v := range b.set {
		if c.set[p] != v {
			return false
		}
	}
	return true
}
585989
func (self BoolEqualer) Equal(e Equaler) bool {
	return self.B == e.(BoolEqualer).B
}
337561
func (u UUID) Equal(another UUID) bool {
	for i, b := range u {
		if b != another[i] {
			return false
		}
	}
	return true
}
1136235
func (b *Boolean) Equal(value bool) *Boolean {
	if !(b.value == value) {
		b.chain.fail("expected boolean == %v, but got %v", value, b.value)
	}
	return b
}
523348
func (o *RestrictHighlightAndSnippetArraysOption) Equal(o2 *RestrictHighlightAndSnippetArraysOption) bool {
	if o2 == nil {
		return o.value == false
	}
	return o.value == o2.value
}
767655
func Equal(t testing.TB, v1, v2 interface{}, args ...interface{}) {
	assert(t, IsEqual(v1, v2), args, []interface{}{"Equal 失败，实际值为v1=[%T:%[1]v];v2=[%T:%[2]v]", v1, v2})
}
770456
func (o *RemoveWordsIfNoResultsOption) Equal(o2 *RemoveWordsIfNoResultsOption) bool {
	if o2 == nil {
		return o.value == "none"
	}
	return o.value == o2.value
}
993700
func (c *Cluster) Equal(other *Cluster) bool {
	return reflect.DeepEqual(c, other)
}
376467
func (t EnumType) Equal(u convert.Equaler) bool {
	other, ok := u.(EnumType)
	if !ok {
		return false
	}
	if !convert.CascadeEqual(t.SimpleType, other.SimpleType) {
		return false
	}
	if !convert.CascadeEqual(t.BaseType, other.BaseType) {
		return false
	}
	if !t.RewritableValues {
		if !reflect.DeepEqual(t.Values, other.Values) {
			return false
		}
	}
	if !reflect.DeepEqual(t.DefaultValue, other.DefaultValue) {
		return false
	}
	return true
}
173941
func (k1 Key) Equal(k2 Key) bool {
	if k1.Space != k2.Space {
		panic("k1 and k2 not in same key space.")
	}
	return k1.Space.Equal(k1, k2)
}
177161
func (result *Result) Equal(other *Result) bool {
	// Check for nil cases
	if result == nil {
		return other == nil
	}
	if other == nil {
		return false
	}

	// Compare Fields, RowsAffected, InsertID, Rows, Extras.
	return FieldsEqual(result.Fields, other.Fields) &&
		result.RowsAffected == other.RowsAffected &&
		result.InsertID == other.InsertID &&
		reflect.DeepEqual(result.Rows, other.Rows) &&
		proto.Equal(result.Extras, other.Extras)
}
245570
func Equal(a1, a2 interface{}) bool {
	if a1 == nil || a2 == nil {
		return a1 == a2
	}
	v1 := reflect.ValueOf(a1)
	v2 := reflect.ValueOf(a2)
	if v1.Type() != v2.Type() {
		return false
	}
	return deepValueEqual(v1, v2, make(map[visit]bool), 0)
}
733976
func (str String) Equal(other Value) bool {
	switch other := other.(type) {
	case String:
		return str == other
	default:
		return false
	}
}