// ContainsMSP mocks membership.ContainsMSP
510530
func (m *MockMembership) ContainsMSP(msp string) bool {
	for _, v := range m.excludeMSPs {
		if v == msp {
			return false
		}
	}
	return true
}
1259691
func (ps ProtocolSet) Contains(p Protocol) bool {
	for _, x := range ps {
		if x == p {
			return true
		}
	}
	return false
}
637338
func (s *RedisSetStore) Contains(key string, value string) (res bool, err error) {
	if !strings.HasPrefix(key, s.prefix) {
		key = s.prefix + key
	}
	res, err = s.client.SIsMember(key, value).Result()
	if err == redis.Nil {
		return res, errors.NewErrNotFound(key)
	}
	return res, err
}
374920
func Contains(collection []string, key string) bool {
	for _, value := range collection {
		if value == key {
			return true
		}
	}

	return false
}
1229615
func (s DistinctNetSet) Contains(ip net.IP) bool {
	key := s.key(ip)
	_, ok := s.members[string(key)]
	return ok
}
1016920
func containsAll(s1 []vmwaretypes.ManagedObjectReference, s2 []vmwaretypes.ManagedObjectReference) bool {
	// put all elements of s1 into a map
	s1Map := make(map[vmwaretypes.ManagedObjectReference]bool)
	for _, mor := range s1 {
		s1Map[mor] = true
	}
	// verify if all elements of s2 are present in s1Map
	for _, mor := range s2 {
		if _, found := s1Map[mor]; !found {
			return false
		}
	}
	return true
}
1235964
func (n *network) contains(ip net.IP) bool {
	for _, s := range n.subnets {
		if s.subnetIP.Contains(ip) {
			return true
		}
	}

	return false
}
379226
func Contains(in interface{}, elem interface{}) bool {
	inValue := reflect.ValueOf(in)
	elemValue := reflect.ValueOf(elem)
	inType := inValue.Type()

	switch inType.Kind() {
	case reflect.String:
		return strings.Contains(inValue.String(), elemValue.String())
	case reflect.Map:
		for _, key := range inValue.MapKeys() {
			if equal(key.Interface(), elem) {
				return true
			}
		}
	case reflect.Slice, reflect.Array:
		for i := 0; i < inValue.Len(); i++ {
			if equal(inValue.Index(i).Interface(), elem) {
				return true
			}
		}
	default:
		panic(fmt.Sprintf("Type %s is not supported by Contains, supported types are String, Map, Slice, Array", inType.String()))
	}

	return false
}
56726
func (p *Pubring) Contains(fp string) bool {
	p.Lock()
	defer p.Unlock()

	for _, pk := range p.data.PublicKeys {
		if pk.Fingerprint == fp {
			return true
		}
	}

	if p.secring == nil {
		return false
	}

	return p.secring.Contains(fp)
}
1333793
func contains(s []string, e string) bool {
	for i := range s {
		if s[i] == e {
			return true
		}
	}
	return false
}
1327255
func (ss *StringSet) Contains(subj string) bool {
	for _, s := range *ss {
		if glob.Glob(s, subj) {
			return true
		}
	}

	return false
}
106168
func Contains(base, cmp error) bool {
	// Check for the easy edge cases.
	if cmp == nil || base == nil {
		return false
	}
	if base == cmp {
		return true
	}

	switch v := base.(type) {
	case Error:
		for _, err := range v.ErrSet {
			if Contains(err, cmp) {
				return true
			}
		}
		return false
	default:
		return false
	}
}
336283
func (r *MockResult) Contains(i int) bool {
	if len(r.Result) > i {
		return true
	} else {
		return false
	}
}
942609
func (e *Error) Contains(sub string) bool {
	if e.err == nil {
		return false
	}
	return strings.Contains(e.formatError(), sub)
}
1181267
func (it *Optional) Contains(ctx context.Context, val graph.Value) bool {
	checked := it.subIt.Contains(ctx, val)
	it.lastCheck = checked
	it.err = it.subIt.Err()
	it.result = val
	return true
}
494191
func Contains(s string, list []string) bool {
	return IsIn(s, list, false)
}
128774
func (pt PrimitiveTypes) Contains(p PrimitiveType) bool {
	for _, v := range pt {
		if p == v {
			return true
		}
	}
	return false
}