// Add ensures that Set contains value, and returns true if it was added (i.e.
// it returns false if the Set already contained the value).
765507
func (s Set) Add(value string) bool {
	if _, ok := s[value]; ok {
		return false
	}
	s[value] = struct{}{}
	return true
}
997533
func Add(a corev1.ResourceList, b corev1.ResourceList) corev1.ResourceList {
	result := corev1.ResourceList{}
	for key, value := range a {
		quantity := *value.Copy()
		if other, found := b[key]; found {
			quantity.Add(other)
		}
		result[key] = quantity
	}
	for key, value := range b {
		if _, found := result[key]; !found {
			quantity := *value.Copy()
			result[key] = quantity
		}
	}
	return result
}
1103046
func (s *Set) Add(v interface{}) {
	s.once.Do(s.init)
	s.m[hashcode(v)] = v
}
88283
func (t *Templates) Add(src string) error {
	if _, err := t.parsed.Parse(src); err != nil {
		return err
	}
	return nil
}
771944
func (ckm ConditionKeyMap) Add(key string, value set.StringSet) {
	if v, ok := ckm[key]; ok {
		ckm[key] = v.Union(value)
	} else {
		ckm[key] = set.CopyStringSet(value)
	}
}
308220
func (l Links) Add(rel string, links ...Link) Links {
	if l.Items == nil {
		l.Items = make(map[string]linkSet)
	}

	set, exists := l.Items[rel]

	if exists {
		set = append(set, links...)
	} else {
		set = make([]Link, len(links))
		copy(set, links)
	}

	l.Items[rel] = set

	return l
}
978082
func (bs *ByString) Add(key string, inc int) int {
	if *bs == nil {
		*bs = make(map[string]int)
	}
	v := (*bs)[key] + inc
	(*bs)[key] = v
	return v
}
349989
func (s Set) Has(value string) bool {
	_, ret := s[value]
	return ret
}
1258373
func (c *IDTokenClaims) Add(key string, value interface{}) {
	if c.Extra == nil {
		c.Extra = make(map[string]interface{})
	}
	c.Extra[key] = value
}
450211
func (s Set) Contain(el string) bool {
	_, in := s[el]
	return in
}
840897
func (s *RedisSetStore) Add(key string, values ...string) error {
	if !strings.HasPrefix(key, s.prefix) {
		key = s.prefix + key
	}
	valuesI := make([]interface{}, len(values))
	for i, v := range values {
		valuesI[i] = v
	}
	return s.client.SAdd(key, valuesI...).Err()
}
1351988
func (c *LRU) Add(key, value interface{}) (evicted bool) {
	// Check for existing item
	if ent, ok := c.items[key]; ok {
		c.evictList.MoveToFront(ent)
		ent.Value.(*entry).value = value
		return false
	}

	// Add new item
	ent := &entry{key, value}
	entry := c.evictList.PushFront(ent)
	c.items[key] = entry

	evict := c.evictList.Len() > c.size
	// Verify size not exceeded
	if evict {
		c.removeOldest()
	}
	return evict
}
290966
func (b *Builder) Add(v interface{}) error {
	if it, ok := v.(*ObjectIterator); ok {
		return WithStack(b.AddKeyValuesFromIterator(it))
	}
	if it, ok := v.(*ArrayIterator); ok {
		return WithStack(b.AddValuesFromIterator(it))
	}
	value := NewValue(v)
	if value.IsIllegal() {
		return WithStack(BuilderUnexpectedTypeError{fmt.Sprintf("Cannot convert value of type %s", reflect.TypeOf(v).Name())})
	}
	if err := b.addInternal(value); err != nil {
		return WithStack(err)
	}
	return nil
}
923314
func (c *ClassList) Add(class string) {
	c.list = append(c.list, class)
}
1013774
func (v Values) Add(key, value string) {
	v[key] = append(v[key], value)
}
1230968
func (c *Cache) Add(key string, value interface{}) {
	if c.cache == nil {
		c.cache = make(map[string]*list.Element)
		c.ll = list.New()
	}
	if ee, ok := c.cache[key]; ok {
		c.ll.MoveToFront(ee)
		ee.Value.(*entry).value = value
		return
	}
	ele := c.ll.PushFront(&entry{key, value})
	c.cache[key] = ele
	if c.MaxEntries != 0 && c.ll.Len() > c.MaxEntries {
		c.RemoveOldest()
	}
}
1129824
func (s StringSet) AddSet(newValues StringSet) {
	for newValue, _ := range newValues {
		s[newValue] = struct{}{}
	}
}