// ContainsNoLock returns true if the id exists in the set. ContainsNoLock is
// not safe for use from multiple goroutines. The caller must manage synchronization.
16474
func (s *SeriesIDSet) ContainsNoLock(id SeriesID) bool {
	return s.bitmap.Contains(uint32(id.RawID()))
}
927170
func (s *SyncedSet) Contains(datas ...interface{}) bool {
	s.RLock()
	defer s.RUnlock()
	for _, data := range datas {
		if _, ok := s.set[data]; !ok {
			return false
		}
	}
	return true
}
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
	}
}
704440
func (r *NetIDRange) Contains(netid uint32) (bool, uint32) {
	if (netid >= r.Base) && ((netid - r.Base) < r.Size) {
		offset := netid - r.Base
		return true, offset
	}
	return false, 0
}
709706
func (r *HashRing) removeMemberNoLock(member membership.Member) bool {
	if _, ok := r.serverSet[member.GetAddress()]; !ok {
		return false
	}
	delete(r.serverSet, member.GetAddress())

	for i := 0; i < r.replicaPoints; i++ {
		r.tree.Delete(
			r.replicaPointForServer(member, i),
		)
	}

	return true
}
1007723
func (s *SeriesIDSet) RemoveNoLock(id SeriesID) {
	s.bitmap.Remove(uint32(id.RawID()))
}
1169342
func Contains(items []corev1.ResourceName, item corev1.ResourceName) bool {
	for _, i := range items {
		if i == item {
			return true
		}
	}
	return false
}
1163858
func (ctl *HandshakeController) releaseKeyNoLock(symkeyid string, topic *Topic) bool {
	if ctl.symKeyIndex[symkeyid] == nil {
		log.Debug("no symkey", "symkeyid", symkeyid)
		return false
	}
	ctl.symKeyIndex[symkeyid].expiredAt = time.Now()
	log.Debug("handshake release", "symkeyid", symkeyid)
	return true
}
177275
func (ci CellID) Contains(oci CellID) bool {
	return uint64(ci.RangeMin()) <= uint64(oci) && uint64(oci) <= uint64(ci.RangeMax())
}
1246691
func contains(list interface{}, value string) bool {
	switch l := list.(type) {
	case []interface{}:
		for _, v := range l {
			if v == value {
				return true
			}
		}
	}
	return false
}
362497
func (s *SeriesIDSet) AddNoLock(id SeriesID) {
	s.bitmap.Add(uint32(id.RawID()))
}
1042966
func Contains(a interface{}, b interface{}) BoolPredicate {
	return func() bool {
		aval, ok := a.([]string)
		if !ok {
			return false
		}
		bval, ok := b.(string)
		if !ok {
			return false
		}
		for _, v := range aval {
			if v == bval {
				return true
			}
		}
		return false
	}
}
472730
func (r *Range) Contains(value int) bool {
	if r.from == nil && r.to == nil {
		return false
	}
	if r.from != nil && value < *r.from {
		return false
	}
	if r.to != nil && value > *r.to {
		return false
	}
	return true
}
1157879
func (s *OrderedSet) ContainsAll(i ...string) bool {
	for _, item := range i {
		if !s.Contains(item) {
			return false
		}
	}
	return true
}
1147846
func (it *Unique) Contains(ctx context.Context, val graph.Value) bool {
	graph.ContainsLogIn(it, val)
	it.runstats.Contains += 1
	return graph.ContainsLogOut(it, val, it.subIt.Contains(ctx, val))
}
1168401
func (p *Secring) Contains(fp string) bool {
	p.Lock()
	defer p.Unlock()

	for _, pk := range p.data.PrivateKeys {
		if pk.PublicKey.Fingerprint == fp {
			return true
		}
	}
	return false
}
515006
func containsWrites(txID string, namespace string, colHashedRWSet *rwsetutil.CollHashedRwSet) bool {
	if colHashedRWSet.HashedRwSet == nil {
		logger.Warningf("HashedRWSet of tx %s, namespace %s, collection %s is nil", txID, namespace, colHashedRWSet.CollectionName)
		return false
	}
	if len(colHashedRWSet.HashedRwSet.HashedWrites) == 0 && len(colHashedRWSet.HashedRwSet.MetadataWrites) == 0 {
		logger.Debugf("HashedRWSet of tx %s, namespace %s, collection %s doesn't contain writes", txID, namespace, colHashedRWSet.CollectionName)
		return false
	}
	return true
}