// Contains reports whether the bypass includes addr.
555791
func (bp *Bypass) Contains(addr string) bool {
	if bp == nil || addr == "" {
		return false
	}

	// try to strip the port
	if host, port, _ := net.SplitHostPort(addr); host != "" && port != "" {
		if p, _ := strconv.Atoi(port); p > 0 { // port is valid
			addr = host
		}
	}

	bp.mux.RLock()
	defer bp.mux.RUnlock()

	if len(bp.matchers) == 0 {
		return false
	}

	var matched bool
	for _, matcher := range bp.matchers {
		if matcher == nil {
			continue
		}
		if matcher.Match(addr) {
			matched = true
			break
		}
	}
	return !bp.reversed && matched ||
		bp.reversed && !matched
}
702851
func (c *Container) Contains(v uint16) bool {
	if c.isArray() {
		return c.arrayContains(v)
	} else if c.isRun() {
		return c.runContains(v)
	} else {
		return c.bitmapContains(v)
	}
}
414934
func (body Body) Contains(x *Expr) bool {
	for _, e := range body {
		if e.Equal(x) {
			return true
		}
	}
	return false
}
1067756
func (m *Map) Contains(k ident.ID) bool {
	_, ok := m.Get(k)
	return ok
}
965596
func Contains(a [][]byte, x []byte) bool {
	n := SearchBytes(a, x)
	return n < len(a) && bytes.Equal(a[n], x)
}
866466
func (c *chainView) Contains(node *blockNode) bool {
	c.mtx.Lock()
	contains := c.contains(node)
	c.mtx.Unlock()
	return contains
}
1259691
func (ps ProtocolSet) Contains(p Protocol) bool {
	for _, x := range ps {
		if x == p {
			return true
		}
	}
	return false
}
756640
func (f Filter) Contains(val interface{}) Filter {
	f.Op = "*="
	f.Val = val
	return f
}
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
}
933297
func (it *And) Contains(ctx context.Context, val graph.Value) bool {
	graph.ContainsLogIn(it, val)
	it.runstats.Contains += 1
	lastResult := it.result
	if it.checkList != nil {
		return it.checkContainsList(ctx, val, lastResult)
	}
	mainGood := it.primaryIt.Contains(ctx, val)
	if mainGood {
		othersGood := it.subItsContain(ctx, val, lastResult)
		if othersGood {
			it.result = val
			return graph.ContainsLogOut(it, val, true)
		}
	}
	if lastResult != nil {
		it.primaryIt.Contains(ctx, lastResult)
	}
	return graph.ContainsLogOut(it, val, false)
}
174913
func (c *BundlingChecker) contains(items []checkerItem) ([]*isolatedclient.PushState, error) {
	var digests []*service.HandlersEndpointsV1Digest
	for _, item := range items {
		digests = append(digests, &service.HandlersEndpointsV1Digest{
			Digest:     string(item.item.Digest),
			Size:       item.item.Size,
			IsIsolated: item.isolated,
		})
	}
	pushStates, err := c.svc.Contains(c.ctx, digests)
	if err != nil {
		return nil, fmt.Errorf("isolate Contains call failed: %v", err)
	}
	return pushStates, nil
}
1256253
func (hm *SyncedHashMap) Contains(key Hashable) bool {
	hm.RLock()
	defer hm.RUnlock()
	if _, ok := (*hm).keys[key.Hash()]; ok {
		return ok
	}
	return false
}
1337296
func (rb *Bitmap) Contains(x uint32) bool {
	hb := highbits(x)
	c := rb.highlowcontainer.getContainer(hb)
	return c != nil && c.contains(lowbits(x))
}
993826
func (m *MultiMap) Contains(key interface{}, value interface{}) bool {
	set, found := m.m[key]
	if _, ok := set[value]; ok {
		return true && found
	}
	return false && found
}
750866
func (b *Bitmap) Contains(v uint64) bool {
	c := b.Containers.Get(highbits(v))
	if c == nil {
		return false
	}
	return c.Contains(lowbits(v))
}
1333793
func contains(s []string, e string) bool {
	for i := range s {
		if s[i] == e {
			return true
		}
	}
	return false
}
85929
func (c *ARCCache) Contains(key interface{}) bool {
	c.lock.RLock()
	defer c.lock.RUnlock()
	return c.t1.Contains(key) || c.t2.Contains(key)
}