// Clone returns a clone of the set.
// Does NOT clone the underlying elements.
328900
func (set LiteralFieldSet) Clone() LiteralFieldSet {
	clonedSet := NewLiteralFieldSet()
	for elem := range set {
		clonedSet.Add(elem)
	}
	return clonedSet
}
811602
func (s *Selection) Clone() *Selection {
	ns := newEmptySelection(s.document)
	ns.Nodes = cloneNodes(s.Nodes)
	return ns
}
494612
func (a *Attribute) Clone() *Attribute {
	return &Attribute{Name: a.Name, Value: a.Value}
}
1189852
func (c *config) clone() *config {
	new := &config{
		threshold:   c.threshold,
		frames:      c.frames,
		errorFrames: c.errorFrames,
		registry:    make(registry),
	}
	for collector, entry := range c.registry {
		new.registry[collector] = entry.clone()
	}
	return new
}
658451
func (v *Values) Clone() *Values {
	v.lock.RLock()
	defer v.lock.RUnlock()

	return newValues(v.root)
}
573958
func (set IdentifierSet) Clone() IdentifierSet {
	clonedSet := NewIdentifierSet()
	for elem := range set {
		clonedSet.Add(elem)
	}
	return clonedSet
}
366443
func (s *Set) Copy() Interface {
	u := newTS()
	for item := range s.m {
		u.Add(item)
	}
	return u
}
143671
func (c *Call) Clone() *Call {
	if c == nil {
		return nil
	}

	other := &Call{
		Name: c.Name,
		Args: CopyArgs(c.Args),
	}
	if c.Children != nil {
		other.Children = make([]*Call, len(c.Children))
		for i := range c.Children {
			other.Children[i] = c.Children[i].Clone()
		}
	}
	return other
}
383742
func (set WordSet) Clone() WordSet {
	clonedSet := NewWordSet()
	for elem := range set {
		clonedSet.Add(elem)
	}
	return clonedSet
}
613410
func (e *Environment) Clone() *Environment {
	if e == nil {
		return &Environment{}
	}
	return proto.Clone(e).(*Environment)
}
998463
func Clone(from *Bitset) *Bitset {
	return &Bitset{numBits: from.numBits, bits: from.bits[:]}
}
347394
func (node *Node) Clone() Node {
	nd := *node
	if node.marker != nil {
		nd.marker = node.marker.Clone()
	}
	return nd
}
535474
func (s *set) Copy() Set {
	cpy := NewSet()
	s.Foreach(func(x *Term) {
		cpy.Add(x)
	})
	return cpy
}
441193
func (vals *ValidatorSet) Copy() *ValidatorSet {
	return &ValidatorSet{
		Validators:       validatorListCopy(vals.Validators),
		Proposer:         vals.Proposer,
		totalVotingPower: vals.totalVotingPower,
	}
}
1317673
func (s VarSet) Copy() VarSet {
	cpy := VarSet{}
	for v := range s {
		cpy.Add(v)
	}
	return cpy
}
1309151
func (s *ConfigSnapshot) Clone() (*ConfigSnapshot, error) {
	snapCopy, err := copystructure.Copy(s)
	if err != nil {
		return nil, err
	}
	return snapCopy.(*ConfigSnapshot), nil
}
1150269
func Copy(elements map[string]interface{}) (result map[string]interface{}) {
	result = make(map[string]interface{}, len(elements))
	for k, v := range elements {
		result[k] = v
	}

	return result
}