//
// Equal - return true if another UUID is equal to this one
//
337561
func (u UUID) Equal(another UUID) bool {
	for i, b := range u {
		if b != another[i] {
			return false
		}
	}
	return true
}
798456
func (s *Service) Equal(other interface{}) bool {
	if service, ok := other.(*Service); ok == true {
		if len(s.Characteristics) != len(service.Characteristics) {
			println("Number of chars wrong")
			return false
		}

		for i, c := range s.Characteristics {
			other := service.Characteristics[i]
			if c.Equal(other) == false {
				return false
			}
		}

		return s.ID == service.ID && s.Type == service.Type
	}

	return false
}
1356823
func (k Key) Equal(other Key) bool {
	if k.IsEmpty() && other.IsEmpty() {
		return true
	}
	if len(k) != len(other) {
		return false
	}
	for i, part := range k {
		if part != other[i] {
			return false
		}
	}
	return true
}
1345990
func Equal(p1, p2 Implementation) bool {
	return bytes.Equal(p1.Bytes(), p2.Bytes())
}
1036101
func (a *AggFuncDesc) Equal(ctx sessionctx.Context, other *AggFuncDesc) bool {
	if a.HasDistinct != other.HasDistinct {
		return false
	}
	return a.baseFuncDesc.equal(ctx, &other.baseFuncDesc)
}
938748
func (u UUID) Equal(v UUID) bool {
	return bytes.Equal(u.b, v.b)
}
165153
func Equal(val1 interface{}, val2 interface{}) bool {
	if val1 == nil || val2 == nil {
		return false
	}
	switch v1 := val1.(type) {
	case UUID:
		if v2, ok := val2.(UUID); ok {
			return v1.Equal(v2)
		}
		return false
	case Timestamp:
		if v2, ok := val2.(Timestamp); ok {
			return v1.Equal(v2)
		}
		return false
	case Array:
		if v2, ok := val2.(Array); ok {
			return v1.Equal(v2)
		}
		return false
	case Struct:
		if v2, ok := val2.(Struct); ok {
			return v1.Equal(v2)
		}
		return false
	case Symbol:
		if v2, ok := val2.(Symbol); ok {
			return v1 == v2
		}
		return false
	case int, int32, int8, int16, int64, float32, float64, uint, uint8, uint16, uint32, uint64:
		return val1 == val2
	case bool:
		return val1 == val2
	case string:
		if v2, ok := val2.(string); ok {
			return v1 == v2
		}
		return false
	case []byte:
		if v2, ok := val2.([]byte); ok {
			return bytes.Compare(v1, v2) == 0
		}
		return false
	default:
		fmt.Println(val1)
		fmt.Println(val2)
		fmt.Println("fix Equal of these two types")
		panic("fix Equal of these two types")
	}
}
1059618
func (t *ID) Equal(other *ID) bool {
	return t.Route.Equal(other.Route) &&
		t.MachineName == other.MachineName &&
		t.Pid == other.Pid
}
1324275
func (lc Lifecycle) Equal(u convert.Equaler) bool {
	other, ok := u.(Lifecycle)
	if !ok {
		return false
	}
	if !lc.CreatedAt.Equal(other.CreatedAt) {
		return false
	}
	if !lc.UpdatedAt.Equal(other.UpdatedAt) {
		return false
	}
	// DeletedAt can be nil so we need to do a special check here.
	if lc.DeletedAt == nil && other.DeletedAt == nil {
		return true
	}
	if lc.DeletedAt != nil && other.DeletedAt != nil {
		return lc.DeletedAt.Equal(*other.DeletedAt)
	}
	return false
}
608214
func (vs *ValueMap) Equal(other *ValueMap) bool {
	if vs == nil {
		return other == nil || other.Len() == 0
	}
	if other == nil {
		return vs == nil || vs.Len() == 0
	}
	return vs.hashMap.Equal(other.hashMap)
}
812162
func (f *PkgFilter) Equal(f2 *PkgFilter) bool {
	if f == f2 {
		return true
	}
	if f.count != f2.count {
		return false
	}

	return bytes.Equal(f.filter, f2.filter)
}
1300928
func (k *Key) Equal(x *Key) bool {
	return k.name == x.name
}
750840
func (t Tag) Equal(value Tag) bool {
	return t.Name.Equal(value.Name) && t.Value.Equal(value.Value)
}
604508
func (o *UserTokenOption) Equal(o2 *UserTokenOption) bool {
	if o2 == nil {
		return o.value == ""
	}
	return o.value == o2.value
}
667294
func (pubKey PubKeyEd25519) Equals(other crypto.PubKey) bool {
	if otherEd, ok := other.(PubKeyEd25519); ok {
		return bytes.Equal(pubKey[:], otherEd[:])
	} else {
		return false
	}
}
690004
func (o *ClusterNameOption) Equal(o2 *ClusterNameOption) bool {
	if o2 == nil {
		return o.value == ""
	}
	return o.value == o2.value
}
1346562
func Equal(u1 UUID, u2 UUID) bool {
	return bytes.Equal(u1[:], u2[:])
}