// Items returns all the items in the map (as key/value pairs) in insertion order.
506366
func (ht *hashtable) items() []Tuple {
	items := make([]Tuple, 0, ht.len)
	array := make([]Value, ht.len*2) // allocate a single backing array
	for e := ht.head; e != nil; e = e.next {
		pair := Tuple(array[:2:2])
		array = array[2:]
		pair[0] = e.key
		pair[1] = e.value
		items = append(items, pair)
	}
	return items
}
411038
func (s Int32) Insert(items ...int32) {
	for _, item := range items {
		s[item] = Empty{}
	}
}
1351
func (o *Object) Keys() *Array {
	keys := []interface{}{}
	for k := range o.value {
		keys = append(keys, k)
	}
	return &Array{o.chain, keys}
}
869263
func (m *SortedMap) Keys() []string {
	keys := make([]string, 0, m.Size())
	m.trie.Allprefixed([]byte{}, func(k []byte, v interface{}) bool {
		keys = append(keys, string(k))
		return true
	})
	return keys
}
875305
func (s *Session) GetAll() map[string]interface{} {
	items := make(map[string]interface{}, s.provider.db.Len(s.sid))
	s.mu.RLock()
	s.provider.db.Visit(s.sid, func(key string, value interface{}) {
		items[key] = value
	})
	s.mu.RUnlock()
	return items
}
913395
func (lru *LRUCache) Keys() []string {
	lru.mu.Lock()
	defer lru.mu.Unlock()

	keys := make([]string, 0, lru.list.Len())
	for e := lru.list.Front(); e != nil; e = e.Next() {
		keys = append(keys, e.Value.(*entry).key)
	}
	return keys
}
474835
func (ps *PrefixScanner) Items() (items []Item, err error) {
	pre := ps.Prefix
	err = ps.db.View(func(tx *bolt.Tx) error {
		c := tx.Bucket(ps.BucketName).Cursor()
		for k, v := c.Seek(pre); bytes.HasPrefix(k, pre); k, v = c.Next() {
			items = append(items, Item{k, v})
		}
		return nil
	})
	if err != nil {
		return nil, err
	}
	return items, err
}
851132
func (mk *MemKeystore) List() ([]string, error) {
	out := make([]string, 0, len(mk.keys))
	for k := range mk.keys {
		out = append(out, k)
	}
	return out, nil
}
477567
func (s *RedisKVStore) List(selector string, options *ListOptions) (map[string]string, error) {
	allKeys, err := s.Keys(selector, options)
	if err != nil {
		return nil, err
	}
	return s.GetAll(allKeys, options)
}
330655
func (bk *Bucket) Items() (items []Item, err error) {
	return items, bk.db.View(func(tx *bolt.Tx) error {
		c := tx.Bucket(bk.Name).Cursor()
		var key, value []byte
		for k, v := c.First(); k != nil; k, v = c.Next() {
			if v != nil {
				key = make([]byte, len(k))
				copy(key, k)
				value = make([]byte, len(v))
				copy(value, v)
				items = append(items, Item{key, value})
			}
		}
		return nil
	})
}
714562
func (c *Container) Items(prefix string, cursor string, count int) ([]stow.Item, string, error) {
	// List all objects in a bucket using pagination
	call := c.client.Objects.List(c.name).MaxResults(int64(count))

	if prefix != "" {
		call.Prefix(prefix)
	}

	if cursor != "" {
		call = call.PageToken(cursor)
	}

	res, err := call.Do()
	if err != nil {
		return nil, "", err
	}
	containerItems := make([]stow.Item, len(res.Items))

	for i, o := range res.Items {
		t, err := time.Parse(time.RFC3339, o.Updated)
		if err != nil {
			return nil, "", err
		}

		u, err := prepUrl(o.MediaLink)
		if err != nil {
			return nil, "", err
		}

		mdParsed, err := parseMetadata(o.Metadata)
		if err != nil {
			return nil, "", err
		}

		containerItems[i] = &Item{
			name:         o.Name,
			container:    c,
			client:       c.client,
			size:         int64(o.Size),
			etag:         o.Etag,
			hash:         o.Md5Hash,
			lastModified: t,
			url:          u,
			metadata:     mdParsed,
			object:       o,
		}
	}

	return containerItems, res.NextPageToken, nil
}
1364595
func (hm *SyncedHashMap) Items() (ci chan Item) {
	go func() {
		hm.RLock()
		defer hm.RUnlock()
		defer close(ci)
		for k := range hm.keys {
			i := Item{(*hm).keys[k], (*hm).values[k]}
			ci <- i
		}
	}()
	return
}
470835
func (k *KV) Keys(prefix, separator string, q *QueryOptions) ([]string, *QueryMeta, error) {
	params := map[string]string{"keys": ""}
	if separator != "" {
		params["separator"] = separator
	}
	resp, qm, err := k.getInternal(prefix, params, q)
	if err != nil {
		return nil, nil, err
	}
	if resp == nil {
		return nil, qm, nil
	}
	defer resp.Body.Close()

	var entries []string
	if err := decodeBody(resp, &entries); err != nil {
		return nil, nil, err
	}
	return entries, qm, nil
}
107607
func (m *MemStore) Keys(prefix string) ([]string, error) {
	m.mutex.Lock()
	defer m.mutex.Unlock()
	mk := make([]string, len(m.store))
	i := 0
	for key := range m.store {
		if strings.HasPrefix(key, prefix) {
			mk[i] = key
			i++
		}
	}
	if i == 0 {
		return []string{}, NewKeyNotFound(prefix)
	}
	return mk[0:i], nil
}
1017902
func (s IntSet) Insert(items ...int) {
	for _, item := range items {
		s[item] = sets.Empty{}
	}
}
349160
func (l Keys) Keys() []string {
	list := make([]string, len(l))
	for i := range l {
		list[i] = l[i].String()
	}
	return list
}
1022057
func (s *SyncedSet) Items() (c chan interface{}) {
	c = make(chan interface{})
	go func() {
		s.RLock()
		defer s.RUnlock()
		defer close(c)
		for k := range s.set {
			c <- k
		}
	}()
	return c

}