return a map with all keys and values where the entries are sorted by the configured order
974627
private static<V> TreeMap<String, V> getValuesMap (String prefix, ParamReader<V> reader) {

        TreeMap<String, V> map = null;

        Iterator iter = config().getKeys(prefix);
        while(iter.hasNext()){
            String key = iter.next().toString();

            if (map == null) {
                map = new TreeMap(keysComparator); // make sure that all keys are inserted by their configured order
            }

            map.put(key, reader.readValue(key));
        }

        return map;
    }
1052139
def entries(self):
        """"""
        passwords = []
        for store in self.stores:
            passwords.extend(store.entries)
        return natsort(passwords, key=lambda e: e.name)
80900
def sort(self, key, *get_patterns,
             by=None, offset=None, count=None,
             asc=None, alpha=False, store=None):
        """"""
        args = []
        if by is not None:
            args += [b'BY', by]
        if offset is not None and count is not None:
            args += [b'LIMIT', offset, count]
        if get_patterns:
            args += sum(([b'GET', pattern] for pattern in get_patterns), [])
        if asc is not None:
            args += [asc is True and b'ASC' or b'DESC']
        if alpha:
            args += [b'ALPHA']
        if store is not None:
            args += [b'STORE', store]
        return self.execute(b'SORT', key, *args)
476413
def csort(objs, key):
    """"""
    idxs = dict((obj, i) for (i, obj) in enumerate(objs))
    return sorted(objs, key=lambda obj: (key(obj), idxs[obj]))
48538
def sortkey(x):
    """"""
    k = str(x[1]).zfill(3) + str(x[2]).zfill(3) + str(x[3]).zfill(3)
    return k
206599
def map_sorted(hash)
      hash.keys
          .sort_by(&:to_sym)
          .map { |k| yield k, hash[k] }
    end
1337698
def get_order(self, codes):
        """"""
        return sorted(codes, key=lambda e: [self.ev2idx.get(e)])
765584
public static function listOrderByKeys()
    {
        $classMethods = get_class_methods(get_class());
        $calledClassMethods = get_class_methods(get_called_class());

        $filteredMethods = array_filter(
            $calledClassMethods, function ($calledClassMethod) use ($classMethods) {
                return !in_array($calledClassMethod, $classMethods, true);
            }
        );

        $list = [];
        foreach ($filteredMethods as $k => $v) {
            $list[$v] = $v;
        }

        return $list;
    }
500780
def keys(self):
        
        k = list(dict.keys(self))
        k.sort()
        return k
786990
def _sorted_keys_items(dobj):
    """"""
    keys = sorted(dobj.keys())
    for key in keys:
        yield key, dobj[key]
417078
private static <K extends Comparable<? super K>, V> Collection<@KeyFor("#1") K> sortedKeySet(
      Map<K, V> m) {
    ArrayList<@KeyFor("#1") K> theKeys = new ArrayList<>(m.keySet());
    Collections.sort(theKeys);
    return theKeys;
  }
517819
public static <K, V> LinkedHashMap<K, V> sortByEntry(Map<K, V> map, Comparator<Map.Entry<K, V>> comparator) {
		return sortToMap(map.entrySet(), comparator);
	}
636740
function _sortPropertyContainers(obj, key) {
        if (_smellsLikeAPropertyContainer(obj)) {
            return _.mapValues(obj, _sortElements);
        }
        else {
            return obj;
        }
    }
1105794
function sortKeys(obj) {
  return Object.keys(obj).sort().reduce(function (r, k) {
    r[k] = obj[k];

    return r[k], r;
  }, {});
}
471960
function sortKeys(obj)
{
  var sortedObj = {};

  if (typeOf(obj) == 'object')
  {
    Object.keys(obj).sort().forEach(function(key)
    {
      sortedObj[key] = sortKeys(obj[key]);
    });

    obj = sortedObj;
  }

  return obj;
}
1221143
def sorted(self, key=None, reverse=False):
        
        return self._transform(transformations.sorted_t(key=key, reverse=reverse))
255835
public static <K, V> LinkedHashMap<K, V> sortToMap(Collection<Map.Entry<K, V>> entryCollection, Comparator<Map.Entry<K, V>> comparator) {
		List<Map.Entry<K, V>> list = new LinkedList<>(entryCollection);
		Collections.sort(list, comparator);

		LinkedHashMap<K, V> result = new LinkedHashMap<>();
		for (Map.Entry<K, V> entry : list) {
			result.put(entry.getKey(), entry.getValue());
		}
		return result;
	}