// Exists returns a bool indicating if the provided value exists
// in this list.  This has undefined behavior if the list is not
// sorted.
168653
func (s Int64Slice) Exists(x int64) bool {
	i := s.Search(x)
	if i == len(s) {
		return false
	}

	return s[i] == x
}
719108
func (v *TreeVertex) Exists(id string) bool {
	return v.Find(id) != nil
}
1144926
func (h *HashMap) Exists(elementid string) (found bool, err error) {
	if h.name == nil {
		return false, ErrDoesNotExist
	}
	return found, (*bbolt.DB)(h.db).View(func(tx *bbolt.Tx) error {
		bucket := tx.Bucket(h.name)
		if bucket == nil {
			return ErrBucketNotFound
		}
		bucket.ForEach(func(byteKey, byteValue []byte) error {
			combinedKey := string(byteKey)
			if strings.Contains(combinedKey, ":") {
				fields := strings.SplitN(combinedKey, ":", 2)
				if fields[0] == elementid {
					found = true
					return ErrFoundIt
				}
			}
			return nil // Continue ForEach
		})
		return nil // Return from View function
	})
}
1074545
func (g *Container) Exists(hierarchy ...string) bool {
	return g.Search(hierarchy...) != nil
}
996085
func (c *MemoryStore) Exists(key string) (bool, error) {
	if _, exists := c.cache.Get(key); exists {
		return true, nil
	}
	return false, nil
}
1311108
func (r *Redis) Exists(key string) bool {
	conn := r.GetConn()
	defer conn.Close()
	if exists, err := redis.Bool(conn.Do("EXISTS", key)); err != nil {
		panic(err)
	} else {
		return exists
	}
}
303108
func (s *Store) Exists(ctx context.Context, name string) bool {
	return s.storage.Exists(ctx, s.passfile(name))
}
420138
func (d *Driver) Exists(id string) bool {
	rID, err := d.resolveID(id)
	if err != nil {
		return false
	}
	result, err := hcsshim.LayerExists(d.info, rID)
	if err != nil {
		return false
	}
	return result
}
518280
func (s IntSet) Exist(val int) bool {
	_, ok := s[val]
	return ok
}
500301
func (d *Dir) Exists(newDir string) bool {
	for _, dir := range d.Blacklist {
		if dir == newDir {
			return true
		}
	}

	return false
}
443115
func (m *InMem) Exists(ctx context.Context, name string) bool {
	m.Lock()
	defer m.Unlock()

	_, found := m.data[name]
	return found
}
1359609
func (set *Set) Exists(item interface{}) bool {
	set.lock.RLock()

	_, ok := set.items[item]

	set.lock.RUnlock()

	return ok
}
387495
func (m *mruNonceMap) Exists(nonce uint64) bool {
	m.mtx.Lock()
	_, exists := m.nonceMap[nonce]
	m.mtx.Unlock()

	return exists
}
997772
func (s *Session) Exists(ctx context.Context, key string) bool {
	sd := s.getSessionDataFromContext(ctx)

	sd.mu.Lock()
	_, exists := sd.Values[key]
	sd.mu.Unlock()

	return exists
}
235295
func (fi *FastIntegerHashMap) Exists(key uint64) bool {
	return fi.packets.exists(key)
}
104296
func (m *Multi) Exists(name string) (string, bool) {
	for _, loader := range m.loaders {
		if fileName, ok := loader.Exists(name); ok {
			return fileName, true
		}
	}
	return "", false
}
834523
func (t Result) Exists() bool {
	return t.Type != Null || len(t.Raw) != 0
}