// Equals returns true if both L4Addr are considered equal.
161718
func (l *L4Addr) Equals(o *L4Addr) bool {
	switch {
	case (l == nil) != (o == nil):
		return false
	case (l == nil) && (o == nil):
		return true
	}
	return l.Port == o.Port && l.Protocol == o.Protocol
}
1303635
func (h Handle) Equals(
	codec kbfscodec.Codec, other Handle) (bool, error) {
	eq, err := h.EqualsIgnoreName(codec, other)
	if err != nil {
		return false, err
	}

	if eq && h.name != other.name {
		return false, nil
	}

	return eq, nil
}
1290976
func (c ConnectionData) Equal(b ConnectionData) bool {
	if c.NetworkType != b.NetworkType {
		return false
	}
	if c.AddressType != b.AddressType {
		return false
	}
	if !c.IP.Equal(b.IP) {
		return false
	}
	if c.TTL != b.TTL {
		return false
	}
	if c.Addresses != b.Addresses {
		return false
	}
	return true
}
1025219
func (h *FriendlyHost) Equal(other *FriendlyHost) bool {
	if other == nil {
		return false
	}

	otherHost, err := svchost.ForComparison(other.Raw)
	if err != nil {
		return false
	}

	host, err := svchost.ForComparison(h.Raw)
	if err != nil {
		return false
	}

	return otherHost == host
}
101085
func (i Integer) Equals(other DxfElement) bool {
	if iValue, ok := other.(*Integer); ok {
		return i.value == iValue.value
	}
	return false
}
1365648
func (v *StructB) Equals(rhs *StructB) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Aa == nil && rhs.Aa == nil) || (v.Aa != nil && rhs.Aa != nil && v.Aa.Equals(rhs.Aa))) {
		return false
	}
	if !v.Ab.Equals(rhs.Ab) {
		return false
	}

	return true
}
42602
func (ipv6a IPv6Addr) Equal(sa SockAddr) bool {
	ipv6b, ok := sa.(IPv6Addr)
	if !ok {
		return false
	}

	if ipv6a.NetIP().String() != ipv6b.NetIP().String() {
		return false
	}

	if ipv6a.NetIPNet().String() != ipv6b.NetIPNet().String() {
		return false
	}

	if ipv6a.Port != ipv6b.Port {
		return false
	}

	return true
}
834336
func (dest ApplicationDestination) Equals(other ApplicationDestination) bool {
	return reflect.DeepEqual(dest, other)
}
1271357
func (cp *ChanPrivs) Equals(other *ChanPrivs) bool {
	return reflect.DeepEqual(cp, other)
}
402744
func (d *DN) Equal(other *DN) bool {
	if len(d.RDNs) != len(other.RDNs) {
		return false
	}
	for i := range d.RDNs {
		if !d.RDNs[i].Equal(other.RDNs[i]) {
			return false
		}
	}
	return true
}
1138626
func (s *Store) Equals(other store.Store) bool {
	if other == nil {
		return false
	}
	return s.URL() == other.URL()
}
1329289
func Equal(a, b string) bool {
	au, err := url.Parse(a)
	if err != nil {
		a = filepath.Clean(a)
		b = filepath.Clean(b)
		// If urls are paths, return true only if they are an exact match
		return a == b
	}
	bu, err := url.Parse(b)
	if err != nil {
		return false
	}

	for _, u := range []*url.URL{au, bu} {
		if u.Path == "" {
			u.Path = "/"
		}
		u.Path = filepath.Clean(u.Path)
	}
	return au.String() == bu.String()
}
1195094
func (nm *NickMode) Equals(other *NickMode) bool {
	return reflect.DeepEqual(nm, other)
}
1363814
func (c *CommandLabelV2) Equals(other CommandLabel) bool {
	if c.GetPeriod() != other.GetPeriod() {
		return false
	}
	if c.GetResult() != other.GetResult() {
		return false
	}
	if !utils.StringSlicesEqual(c.GetCommand(), other.GetCommand()) {
		return false
	}
	return true
}
124133
func (r RoleMapping) Equals(o RoleMapping) bool {
	if r.Remote != o.Remote {
		return false
	}
	if !utils.StringSlicesEqual(r.Local, r.Local) {
		return false
	}
	return true
}
1374988
func (v *RPC) Equals(rhs *RPC) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !bytes.Equal(v.SpanContext, rhs.SpanContext) {
		return false
	}
	if !(v.CallerName == rhs.CallerName) {
		return false
	}
	if !(v.ServiceName == rhs.ServiceName) {
		return false
	}
	if !(v.Encoding == rhs.Encoding) {
		return false
	}
	if !(v.Procedure == rhs.Procedure) {
		return false
	}
	if !((v.Headers == nil && rhs.Headers == nil) || (v.Headers != nil && rhs.Headers != nil && _Map_String_String_Equals(v.Headers, rhs.Headers))) {
		return false
	}
	if !_String_EqualsPtr(v.ShardKey, rhs.ShardKey) {
		return false
	}
	if !_String_EqualsPtr(v.RoutingKey, rhs.RoutingKey) {
		return false
	}
	if !_String_EqualsPtr(v.RoutingDelegate, rhs.RoutingDelegate) {
		return false
	}
	if !((v.Body == nil && rhs.Body == nil) || (v.Body != nil && rhs.Body != nil && bytes.Equal(v.Body, rhs.Body))) {
		return false
	}

	return true
}
435741
func (v *Xception) Equals(rhs *Xception) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !_I32_EqualsPtr(v.ErrorCode, rhs.ErrorCode) {
		return false
	}
	if !_String_EqualsPtr(v.Message, rhs.Message) {
		return false
	}

	return true
}