func (s *Set) Copy() *Set {
	u := NewWithSize(s.Size())
	for item := range s.m {
		u.m[item] = keyExists
	}
	return u
}
Copy returns a new Set with a copy of s.
package route53endpointrulereferenceset
import (
	"fmt"
	"strings"
	"github.com/redhat-cop/global-load-balancer-operator/controllers/common/route53"
)
var (
	keyExists   = struct{}{}
	nonExistent route53.Route53EndpointRuleReference
)
const maxInt = int(^uint(0) >> 1)
type Set struct {
	m map[route53.Route53EndpointRuleReference]struct{}
}
func New(ts ...route53.Route53EndpointRuleReference) *Set {
	s := NewWithSize(len(ts))
	s.Add(ts...)
	return s
}
func NewWithSize(size int) *Set {
	return &Set{make(map[route53.Route53EndpointRuleReference]struct{}, size)}
}
func (s *Set) Add(items ...route53.Route53EndpointRuleReference) {
	for _, item := range items {
		s.m[item] = keyExists
	}
}
func (s *Set) Remove(items ...route53.Route53EndpointRuleReference) {
	for _, item := range items {
		delete(s.m, item)
	}
}
func (s *Set) Pop() route53.Route53EndpointRuleReference {
	for item := range s.m {
		delete(s.m, item)
		return item
	}
	return nonExistent
}
func (s *Set) Pop2() (route53.Route53EndpointRuleReference, bool) {
	for item := range s.m {
		delete(s.m, item)
		return item, true
	}
	return nonExistent, false
}
func (s *Set) Has(items ...route53.Route53EndpointRuleReference) bool {
	has := false
	for _, item := range items {
		if _, has = s.m[item]; !has {
			break
		}
	}
	return has
}
func (s *Set) HasAny(items ...route53.Route53EndpointRuleReference) bool {
	has := false
	for _, item := range items {
		if _, has = s.m[item]; has {
			break
		}
	}
	return has
}
func (s *Set) Size() int {
	return len(s.m)
}
func (s *Set) Clear() {
	s.m = make(map[route53.Route53EndpointRuleReference]struct{})
}
func (s *Set) IsEmpty() bool {
	return s.Size() == 0
}
func (s *Set) IsEqual(t *Set) bool {
	if s.Size() != t.Size() {
		return false
	}
	equal := true
	t.Each(func(item route53.Route53EndpointRuleReference) bool {
		_, equal = s.m[item]
		return equal  
	})
	return equal
}
func (s *Set) IsSubset(t *Set) bool {
	if s.Size() < t.Size() {
		return false
	}
	subset := true
	t.Each(func(item route53.Route53EndpointRuleReference) bool {
		_, subset = s.m[item]
		return subset
	})
	return subset
}
func (s *Set) IsSuperset(t *Set) bool {
	return t.IsSubset(s)
}
func (s *Set) Each(f func(item route53.Route53EndpointRuleReference) bool) {
	for item := range s.m {
		if !f(item) {
			break
		}
	}
}