// Equals compares the EntitySlice to the other for equality.
323244
func (e EntitySlice) Equals(other EntitySlice) bool {
	if len(e) != len(other) {
		return false
	}

	for i, entity := range e {
		otherEntity := other[i]

		if !entity.Equals(otherEntity) {
			return false
		}
	}

	return true
}
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
}
354085
func (p Polyline) Equals(other core.DxfElement) bool {
	if otherPolyline, ok := other.(*Polyline); ok {
		return p.BaseEntity.Equals(otherPolyline.BaseEntity) &&
			core.FloatEquals(p.Elevation, otherPolyline.Elevation) &&
			core.FloatEquals(p.Thickness, otherPolyline.Thickness) &&
			p.Closed == otherPolyline.Closed &&
			p.CurveFitVerticesAdded == otherPolyline.CurveFitVerticesAdded &&
			p.SplineFitVerticesAdded == otherPolyline.SplineFitVerticesAdded &&
			p.Is3dPolyline == otherPolyline.Is3dPolyline &&
			p.Is3dPolygonMesh == otherPolyline.Is3dPolygonMesh &&
			p.PolygonMeshClosedNDir == otherPolyline.PolygonMeshClosedNDir &&
			p.IsPolyfaceMesh == otherPolyline.IsPolyfaceMesh &&
			p.LineTypeParentAround == otherPolyline.LineTypeParentAround &&
			core.FloatEquals(p.DefaultStartWidth, otherPolyline.DefaultStartWidth) &&
			core.FloatEquals(p.DefaultEndWidth, otherPolyline.DefaultEndWidth) &&
			p.VertexCountM == otherPolyline.VertexCountM &&
			p.VertexCountN == otherPolyline.VertexCountN &&
			p.SmoothDensityM == otherPolyline.SmoothDensityM &&
			p.SmoothDensityN == otherPolyline.SmoothDensityN &&
			p.SmoothSurface == otherPolyline.SmoothSurface &&
			p.ExtrusionDirection.Equals(otherPolyline.ExtrusionDirection) &&
			p.Vertices.Equals(otherPolyline.Vertices)
	}
	return false
}
673092
func (v *GuessProtocolStruct) Equals(rhs *GuessProtocolStruct) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.MapField == nil && rhs.MapField == nil) || (v.MapField != nil && rhs.MapField != nil && _Map_String_String_Equals(v.MapField, rhs.MapField))) {
		return false
	}

	return true
}
1201820
func (v *StructA) Equals(rhs *StructA) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !(v.S == rhs.S) {
		return false
	}

	return true
}
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
}
722233
func (v *Xtruct3) Equals(rhs *Xtruct3) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !_String_EqualsPtr(v.StringThing, rhs.StringThing) {
		return false
	}
	if !_I32_EqualsPtr(v.Changed, rhs.Changed) {
		return false
	}
	if !_I32_EqualsPtr(v.I32Thing, rhs.I32Thing) {
		return false
	}
	if !_I64_EqualsPtr(v.I64Thing, rhs.I64Thing) {
		return false
	}

	return true
}
123645
func (m *MetadataValue) Equals(md MetadataValue) bool {
	return m.Type == md.Type && m.Value == md.Value
}
986302
func (v *ListTypeVersioningV2) Equals(rhs *ListTypeVersioningV2) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Strings == nil && rhs.Strings == nil) || (v.Strings != nil && rhs.Strings != nil && _List_String_Equals(v.Strings, rhs.Strings))) {
		return false
	}
	if !_String_EqualsPtr(v.Hello, rhs.Hello) {
		return false
	}

	return true
}
1121162
func (v *Type) Equals(rhs *Type) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !_SimpleType_EqualsPtr(v.SimpleType, rhs.SimpleType) {
		return false
	}
	if !((v.SliceType == nil && rhs.SliceType == nil) || (v.SliceType != nil && rhs.SliceType != nil && v.SliceType.Equals(rhs.SliceType))) {
		return false
	}
	if !((v.KeyValueSliceType == nil && rhs.KeyValueSliceType == nil) || (v.KeyValueSliceType != nil && rhs.KeyValueSliceType != nil && v.KeyValueSliceType.Equals(rhs.KeyValueSliceType))) {
		return false
	}
	if !((v.MapType == nil && rhs.MapType == nil) || (v.MapType != nil && rhs.MapType != nil && v.MapType.Equals(rhs.MapType))) {
		return false
	}
	if !((v.ReferenceType == nil && rhs.ReferenceType == nil) || (v.ReferenceType != nil && rhs.ReferenceType != nil && v.ReferenceType.Equals(rhs.ReferenceType))) {
		return false
	}
	if !((v.PointerType == nil && rhs.PointerType == nil) || (v.PointerType != nil && rhs.PointerType != nil && v.PointerType.Equals(rhs.PointerType))) {
		return false
	}

	return true
}
122628
func (v *CrazyNesting) Equals(rhs *CrazyNesting) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !_String_EqualsPtr(v.StringField, rhs.StringField) {
		return false
	}
	if !((v.SetField == nil && rhs.SetField == nil) || (v.SetField != nil && rhs.SetField != nil && _Set_Insanity_Equals(v.SetField, rhs.SetField))) {
		return false
	}
	if !_List_Map_Set_I32_Map_I32_Set_List_Map_Insanity_String_Equals(v.ListField, rhs.ListField) {
		return false
	}
	if !((v.BinaryField == nil && rhs.BinaryField == nil) || (v.BinaryField != nil && rhs.BinaryField != nil && bytes.Equal(v.BinaryField, rhs.BinaryField))) {
		return false
	}

	return true
}
88973
func (d *ResourceDevices) Equals(o *ResourceDevices) bool {
	if d == o {
		return true
	}
	if d == nil || o == nil {
		return false
	}
	if len(*d) != len(*o) {
		return false
	}
	m := make(map[string]*RequestedDevice, len(*d))
	for _, e := range *d {
		m[e.Name] = e
	}
	for _, oe := range *o {
		de, ok := m[oe.Name]
		if !ok || !de.Equals(oe) {
			return false
		}
	}
	return true
}
286244
func Equals(a interface{}, b interface{}) BoolPredicate {
	return func() bool {
		switch aval := a.(type) {
		case string:
			bval, ok := b.(string)
			return ok && aval == bval
		case []string:
			bval, ok := b.([]string)
			if !ok {
				return false
			}
			if len(aval) != len(bval) {
				return false
			}
			for i := range aval {
				if aval[i] != bval[i] {
					return false
				}
			}
			return true
		default:
			return false
		}
	}
}
1015245
func (a Arc) Equals(other core.DxfElement) bool {
	if otherArc, ok := other.(*Arc); ok {
		return a.BaseEntity.Equals(otherArc.BaseEntity) &&
			core.FloatEquals(a.Thickness, otherArc.Thickness) &&
			a.Center.Equals(otherArc.Center) &&
			core.FloatEquals(a.Radius, otherArc.Radius) &&
			core.FloatEquals(a.StartAngle, otherArc.StartAngle) &&
			core.FloatEquals(a.EndAngle, otherArc.EndAngle) &&
			a.ExtrusionDirection.Equals(otherArc.ExtrusionDirection)
	}
	return false
}
767234
func (v *TypePair) Equals(rhs *TypePair) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !v.Left.Equals(rhs.Left) {
		return false
	}
	if !v.Right.Equals(rhs.Right) {
		return false
	}

	return true
}
149599
func (v *ResourceDoesNotExist) Equals(rhs *ResourceDoesNotExist) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !(v.Key == rhs.Key) {
		return false
	}
	if !_String_EqualsPtr(v.Message, rhs.Message) {
		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
}