// has returns true if a native path 'rel' is in the tree.
//
// nil pathTree is considered empty.
347060
func (p *pathTree) has(rel string) bool {
	if p == nil {
		return false
	}

	if !p.caseSensitive {
		rel = strings.ToLower(rel)
	}

	// It matches some added entry exactly?
	if p.leafs.Has(rel) {
		return true
	}
	// Was added as a parent of some entry?
	if p.nodes.Has(rel) {
		return true
	}

	// Maybe it has some added entry as its parent?
	found := false
	parentDirs(rel, func(par string) bool {
		found = p.leafs.Has(par)
		return !found
	})
	return found
}
960513
func (m Metadata) Has(key string) (exists bool) {
	_, exists = m[key]
	return
}
1154291
func (t *Trie) Has(entry string) bool {
	return t.Root.has([]byte(entry))
}
1272036
func (params Params) Has(key string) bool {
	_, ok := params[key]
	return ok
}
804716
func (u *User) Has(key string) bool {
	u.RLock()
	defer u.RUnlock()

	_, ok := u.data[key]
	return ok
}
96161
func (d *LogDatastore) Has(key Key) (exists bool, err error) {
	log.Printf("%s: Has %s\n", d.Name, key)
	return d.child.Has(key)
}
719108
func (v *TreeVertex) Exists(id string) bool {
	return v.Find(id) != nil
}
318584
func (m *MemLogger) Has(lvl logging.Level, msg string, data map[string]interface{}) bool {
	return m.Get(lvl, msg, data) != nil
}
1073285
func (p *PathManager) HasPath(path string) bool {
	p.l.RLock()
	defer p.l.RUnlock()

	if _, exceptionRaw, ok := p.paths.Root().LongestPrefix([]byte(path)); ok {
		var exception bool
		if exceptionRaw != nil {
			exception = exceptionRaw.(bool)
		}
		return !exception
	}
	return false
}
1094520
func (c *Config) Has(name string, idx int, options ...Option) (bool, error) {
	opts := makeOptions(options)
	p := parsePathIdx(name, opts.pathSep, idx)
	return p.Has(c, opts)
}
472568
func (p Path) HasPrefix(other Path) bool {
	if len(other) > len(p) {
		return false
	}
	for i := range other {
		if p[i] != other[i] {
			return false
		}
	}
	return true
}
525872
func (evl EvidenceList) Has(evidence Evidence) bool {
	for _, ev := range evl {
		if ev.Equal(evidence) {
			return true
		}
	}
	return false
}
117997
func (db *DB) Has(key []byte) (yes bool, err error) {
	yes, err = db.ldb.Has(key, nil)
	if err != nil {
		metrics.GetOrRegisterCounter("DB.hasFail", nil).Inc(1)
		return false, err
	}
	metrics.GetOrRegisterCounter("DB.has", nil).Inc(1)
	return yes, nil
}
121395
func (rh *HashMap) Has(elementid, key string) (bool, error) {
	conn := rh.pool.Get(rh.dbindex)
	retval, err := conn.Do("HEXISTS", rh.id+":"+elementid, key)
	if err != nil {
		panic(err)
	}
	return redis.Bool(retval, err)
}
492336
func (n *NetStore) Has(ctx context.Context, ref Address) bool {
	return n.store.Has(ctx, ref)
}
1101825
func (db *GoLevelDB) Has(key []byte) bool {
	return db.Get(key) != nil
}
342185
func (t *Immutable) Has(key []byte) bool {
	if node := t.get(key); node != nil {
		return true
	}
	return false
}