// Contains checks whether the key is in the region, for the maximum region endKey is empty.
// startKey <= key < endKey.
344452
func (r *Region) Contains(key []byte) bool {
	return bytes.Compare(r.meta.GetStartKey(), key) <= 0 &&
		(bytes.Compare(key, r.meta.GetEndKey()) < 0 || len(r.meta.GetEndKey()) == 0)
}
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
}
1237198
func contains(slice []string, el string) bool {
	for _, e := range slice {
		if e == el {
			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
}
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
}
1328675
func (m Map) Contains(key string) bool {
	for _, k := range m.Keys() {
		if k == key {
			return true
		}
	}

	return false
}
906198
func containsKey(keys []string, key string) bool {
	for _, k := range keys {
		if k == key {
			return true
		}
	}
	return false
}
368931
func (b *BinaryTree) Contains(target Comparable) bool {
	return b.search(target) != nil
}
63616
func (p *DB) Contains(key []byte) bool {
	p.mu.RLock()
	_, exact := p.findGE(key, false)
	p.mu.RUnlock()
	return exact
}
1233373
func (t *Trie) Contains(key []byte) bool {
	if n := t.search(key); n.external != nil && bytes.Equal(n.external.key, key) {
		return true
	}
	return false
}
965596
func Contains(a [][]byte, x []byte) bool {
	n := SearchBytes(a, x)
	return n < len(a) && bytes.Equal(a[n], x)
}
225061
func (r *Allocator) contains(block uid.Block) (bool, uint32) {
	return r.r.Offset(block)
}
804388
func (pk PrimaryKeyArray) Contains(key string) bool {
	for _, name := range pk {
		if name == key {
			return true
		}
	}
	return false
}
482393
func (d *indirectIndex) Contains(key []byte) bool {
	d.mu.RLock()
	iter := d.ro.Iterator()
	exact, _ := iter.Seek(key, &d.b)
	d.mu.RUnlock()
	return exact
}
219603
func (m *MultiMap) ContainsKey(key interface{}) (found bool) {
	_, found = m.m[key]
	return
}
1036364
func (b LocationBounds) Contains(loc Location) bool {
	if b.SpansDateLine() {
		return loc.Longitude >= b.West || loc.Longitude <= b.East
	}
	return loc.Longitude >= b.West && loc.Longitude <= b.East
}
198032
func (ipr *IPRange) Contains(ip net.IP) bool {
	// if ip is less than start, return false
	if bytes.Compare([]byte(ip), []byte(ipr.Start)) < 0 {
		return false
	}
	// return true if ip is less than or equal to end
	return bytes.Compare([]byte(ip), []byte(ipr.End)) <= 0
}