// Equals tests equality against another Tag.
557388
func (tag Tag) Equals(other DxfElement) bool {
	if otherTag, ok := other.(*Tag); ok {
		return tag.Code == otherTag.Code && tag.Value.Equals(otherTag.Value)
	}
	return false
}
1240621
func (b Block) Equals(other core.DxfElement) bool {
	if otherBlock, ok := other.(*Block); ok {
		return b.Name == otherBlock.Name &&
			b.Handle == otherBlock.Handle &&
			b.LayerName == otherBlock.LayerName &&
			b.SecondName == otherBlock.SecondName &&
			b.BasePoint.Equals(otherBlock.BasePoint) &&
			b.XrefPathName == otherBlock.XrefPathName &&
			b.Description == otherBlock.Description &&
			b.Entities.Equals(otherBlock.Entities)
	}
	return false
}
342105
func (v *ListBonks) Equals(rhs *ListBonks) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Bonk == nil && rhs.Bonk == nil) || (v.Bonk != nil && rhs.Bonk != nil && _List_Bonk_Equals(v.Bonk, rhs.Bonk))) {
		return false
	}

	return true
}
1262349
func (v *NestedListsBonk) Equals(rhs *NestedListsBonk) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Bonk == nil && rhs.Bonk == nil) || (v.Bonk != nil && rhs.Bonk != nil && _List_List_List_Bonk_Equals(v.Bonk, rhs.Bonk))) {
		return false
	}

	return true
}
1087872
func (v *Xtruct) Equals(rhs *Xtruct) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !_String_EqualsPtr(v.StringThing, rhs.StringThing) {
		return false
	}
	if !_Byte_EqualsPtr(v.ByteThing, rhs.ByteThing) {
		return false
	}
	if !_I32_EqualsPtr(v.I32Thing, rhs.I32Thing) {
		return false
	}
	if !_I64_EqualsPtr(v.I64Thing, rhs.I64Thing) {
		return false
	}

	return true
}
1372088
func CompareTags(a, b Tags) int {
	// Compare each key & value until a mismatch.
	for i := 0; i < len(a) && i < len(b); i++ {
		if cmp := bytes.Compare(a[i].Key, b[i].Key); cmp != 0 {
			return cmp
		}
		if cmp := bytes.Compare(a[i].Value, b[i].Value); cmp != 0 {
			return cmp
		}
	}

	// If all tags are equal up to this point then return shorter tagset.
	if len(a) < len(b) {
		return -1
	} else if len(a) > len(b) {
		return 1
	}

	// All tags are equal.
	return 0
}
1019993
func (graph *GraphConfig) Equals(that *GraphConfig) bool {
	return reflect.DeepEqual(graph, that)
}
6216
func (v *Bools) Equals(rhs *Bools) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !_Bool_EqualsPtr(v.ImTrue, rhs.ImTrue) {
		return false
	}
	if !_Bool_EqualsPtr(v.ImFalse, rhs.ImFalse) {
		return false
	}

	return true
}
359152
func (v *Bonk) Equals(rhs *Bonk) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !_String_EqualsPtr(v.Message, rhs.Message) {
		return false
	}
	if !_I32_EqualsPtr(v.Type, rhs.Type) {
		return false
	}

	return true
}
1219495
func (l Labels) Equals(other Labels) bool {
	if len(l) != len(other) {
		return false
	}

	for k, lbl1 := range l {
		if lbl2, ok := other[k]; ok {
			if lbl1.Source == lbl2.Source && lbl1.Key == lbl2.Key && lbl1.Value == lbl2.Value {
				continue
			}
		}
		return false
	}
	return true
}
966038
func (v *VersioningTestV1) Equals(rhs *VersioningTestV1) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !_I32_EqualsPtr(v.BeginInBoth, rhs.BeginInBoth) {
		return false
	}
	if !_String_EqualsPtr(v.OldString, rhs.OldString) {
		return false
	}
	if !_I32_EqualsPtr(v.EndInBoth, rhs.EndInBoth) {
		return false
	}

	return true
}
268064
func (v *KeyValue_GetValue_Result) Equals(rhs *KeyValue_GetValue_Result) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !_String_EqualsPtr(v.Success, rhs.Success) {
		return false
	}
	if !((v.DoesNotExist == nil && rhs.DoesNotExist == nil) || (v.DoesNotExist != nil && rhs.DoesNotExist != nil && v.DoesNotExist.Equals(rhs.DoesNotExist))) {
		return false
	}

	return true
}
648442
func (t Tags) Equal(other Tags) bool {
	if len(t.Values()) != len(other.Values()) {
		return false
	}
	for i := 0; i < len(t.Values()); i++ {
		equal := t.values[i].Name.Equal(other.values[i].Name) &&
			t.values[i].Value.Equal(other.values[i].Value)
		if !equal {
			return false
		}
	}
	return true
}
1354723
func (blockID BlockID) Equals(other BlockID) bool {
	return bytes.Equal(blockID.Hash, other.Hash) &&
		blockID.PartsHeader.Equals(other.PartsHeader)
}
736022
func (a *Affinity) Equals(o *Affinity) bool {
	return a == o ||
		a.LTarget == o.LTarget &&
			a.RTarget == o.RTarget &&
			a.Operand == o.Operand &&
			a.Weight == o.Weight
}
1047537
func (m Metadata) Equals(md Metadata) bool {
	if len(m) != len(md) {
		return false
	}
	for k, v := range m {
		if val, ok := md[k]; !ok || !val.Equals(v) {
			return false
		}
	}

	return true
}
765708
func (b Blob) Equal(other Argument) bool {
	if other.Typetag() != TypetagBlob {
		return false
	}
	b2 := other.(Blob)
	if len(b) != len(b2) {
		return false
	}
	return bytes.Equal(b, b2)
}