// Has returns true if the provided port is already allocated and a call
// to Allocate(port) would fail with ErrAllocated.
192249
func (r *PortAllocator) Has(port int) bool {
	ok, offset := r.contains(port)
	if !ok {
		return false
	}

	return r.alloc.Has(offset)
}
603261
func (db *Database) Has(key []byte) (bool, error) {
	return db.db.Has(key, nil)
}
1230333
func (e *Errors) Has(class string) bool {
	for _, err := range *e {
		if err.Kind() == class {
			return true
		}
	}
	return false
}
847835
func (r *Range) Has(ip net.IP) bool {
	ok, offset := r.contains(ip)
	if !ok {
		return false
	}

	return r.alloc.Has(offset)
}
915944
func (s Int32) Has(item int32) bool {
	_, contained := s[item]
	return contained
}
853388
func (t *LLRB) Has(key Item) bool {
	return t.Get(key) != nil
}
29269
func (ps *PortSet) Contains(value int) bool {
	for _, portRange := range *ps {
		if portRange.Contains(value) {
			return true
		}
	}

	return false
}
613794
func hasPort(s string) bool {
	// IPv6 address in brackets.
	if strings.LastIndex(s, "[") == 0 {
		return strings.LastIndex(s, ":") > strings.LastIndex(s, "]")
	}

	// Otherwise the presence of a single colon determines if there's a port
	// since IPv6 addresses outside of brackets (count > 1) can't have a
	// port.
	return strings.Count(s, ":") == 1
}
14217
func Has(in interface{}, key interface{}) bool {
	av := reflect.ValueOf(in)

	switch av.Kind() {
	case reflect.Map:
		kv := reflect.ValueOf(key)
		return av.MapIndex(kv).IsValid()
	case reflect.Slice, reflect.Array:
		l := av.Len()
		for i := 0; i < l; i++ {
			v := av.Index(i).Interface()
			if reflect.DeepEqual(v, key) {
				return true
			}
		}
	}

	return false
}
1140519
func (t *table) Has(key []byte) (bool, error) {
	return t.db.Has(append([]byte(t.prefix), key...))
}
1062303
func (m *SecureMap) Has(key interface{}) bool {
	m.lock.RLock()
	_, ok := m.data[key]
	m.lock.RUnlock()
	return ok
}
6380
func (r *AllocationBitmap) Has(offset int) bool {
	r.lock.Lock()
	defer r.lock.Unlock()

	return r.allocated.Bit(offset) == 1
}
349989
func (s Set) Has(value string) bool {
	_, ret := s[value]
	return ret
}
883705
func (inspector *Inspector) Has(chunkAddresses []storage.Address) []HasInfo {
	results := make([]HasInfo, 0)
	for _, addr := range chunkAddresses {
		res := HasInfo{}
		res.Addr = addr.String()
		res.Has = inspector.netStore.Has(context.Background(), addr)
		results = append(results, res)
	}
	return results
}
138558
func Has(keyvals []KeyVal, keyword string) []KeyVal {
	return HasKeyword(keyvals, Keyword(keyword))
}
585649
func (c *ServiceConfigs) Has(name string) bool {
	c.mu.RLock()
	defer c.mu.RUnlock()
	_, ok := c.m[name]
	return ok
}
804716
func (u *User) Has(key string) bool {
	u.RLock()
	defer u.RUnlock()

	_, ok := u.data[key]
	return ok
}