A List of the keys in c, sorted from highest count to lowest, paired with
counts

@return A List of the keys in c, sorted from highest count to lowest.
519569
public static <E> List<Pair<E, Double>> toSortedListWithCounts(Counter<E> c) {
    List<Pair<E, Double>> l = new ArrayList<Pair<E, Double>>(c.size());
    for (E e : c.keySet()) {
      l.add(new Pair<E, Double>(e, c.getCount(e)));
    }
    // descending order
    Collections.sort(l, new Comparator<Pair<E, Double>>() {
      public int compare(Pair<E, Double> a, Pair<E, Double> b) {
        return Double.compare(b.second, a.second);
      }
    });
    return l;
  }
1121815
@SuppressWarnings("deprecation") // The String ctor is deprecated, but fast.
  public Set<String> keys() {
    if (isEmpty()) {
      return Collections.emptySet();
    }
    Set<String> ks = new HashSet<>(size);
    for (int i = 0; i < size; i++) {
      ks.add(new String(name(i), 0 /* hibyte */));
    }
    // immutable in case we decide to change the implementation later.
    return Collections.unmodifiableSet(ks);
  }
43944
public static List<Key> hierarchy(Key key) {
		List<Key> hierarchy = new ArrayList<Key>();
		hierarchy.add(key);
		
		while (key.getParent() != null) {
			key = key.getParent();
			hierarchy.add(key);
		}
		
		Collections.reverse(hierarchy);
		return hierarchy;
	}
1044813
public java.util.List<KeyPairInfo> getKeyPairs() {
        if (keyPairs == null) {
            keyPairs = new com.amazonaws.internal.SdkInternalList<KeyPairInfo>();
        }
        return keyPairs;
    }
893946
public List<Symbol> getAllSymbolsSorted() {
    List<Symbol> sortedSymbols = getNaturalSymbolOrdering().sortedCopy(symbols.values());
    return sortedSymbols;
  }
137907
public List<Pair<A, B>> getEntries() {
        List<Pair<A, B>> l = new ArrayList<>(size());
        for (Map.Entry<A, B> x : map1.entrySet())
            l.add(new Pair<>(x.getKey(), x.getValue()));
        return l;
    }
500780
def keys(self):
        
        k = list(dict.keys(self))
        k.sort()
        return k
1038609
public function get_key_list() {
        $keys = array();
        foreach ($this->collection as $node) {
            $keys[] = $node->key;
        }
        return $keys;
    }
48916
public Map<T, Integer> getAllSorted()
    {
        Map<T, Integer> map = styles;
        TreeMap<T, Integer> smap = new TreeMap<T, Integer>(new StyleCountComparator(map));
        smap.putAll(map);
        return smap;
    }
987514
public List<String> toList() {
        return doWithJedis(new JedisCallable<List<String>>() {
            @Override
            public List<String> call(Jedis jedis) {
                return jedis.lrange(getKey(), 0, jedis.llen(getKey())-1);
            }
        });
    }
931592
public String keyList() {
		String separator = "";
		StringBuilder buffer = new StringBuilder();
		String item;

		for (int i = 0; i < names.size(); i++) {
			item = names.get(i);
			buffer.append(separator + item);
			separator = ", ";
		}

		return buffer.toString();
	}
281007
public List<String> getKeys() {
        CodeGeneratorLoggerFactory.getLogger().debug(String.format("Reading keys from data file [%s]", fileName));
        List<String> keys = reader.getAllKeys();
        checkForDuplicateKeys(keys);
        return keys;
    }
707108
def keys(self):
        
        return sorted([k for k in dir(self) if
                       k[0:1] != '_' and k != 'keys' and not k.isupper() and
                       not inspect.ismethod(getattr(self, k)) and
                       not (hasattr(self.__class__, k) and
                            isinstance(getattr(self.__class__, k),
                                       property)) and
                       not isinstance(getattr(self, k), property)])
1252529
private List<Data> selectThisPartitionsKeys() {
        final IPartitionService partitionService = mapServiceContext.getNodeEngine().getPartitionService();
        final int partitionId = getPartitionId();
        List<Data> dataKeys = null;
        for (Data key : keys) {
            if (partitionId == partitionService.getPartitionId(key)) {
                if (dataKeys == null) {
                    dataKeys = new ArrayList<>(keys.size());
                }
                dataKeys.add(key);
            }
        }
        if (dataKeys == null) {
            return Collections.emptyList();
        }
        return dataKeys;
    }
299741
private List<List<K>> prepareKeysForParallelism() {
		// Calculate the number of row keys to be queried at a time.
		// Consider whether parallelism is enabled or not.
		// When numThreads is calculated, the int truncation
		// causes one fewer thread to be used if numKeys isn't evenly divided
		// into maxRowCountPerQuery. Thus,
		// the keys are divided among threads/ calls evenly with each thread
		// getting up to maxRowCountPerQuery

		List<List<K>> returnKeys = new LinkedList<List<K>>();

		int numKeys = rowKeys.size();

		// Calculate how many thread are required based on input # keys and each
		// time rowkeys limit of maxRowCountPerQuery
		int numThreads = 1;

		if(maxRowCountPerQuery>0){
			numThreads=(int) Math.ceil((numKeys / (double) maxRowCountPerQuery));
			numThreads=	Math.max(numThreads, 1);
		}

		// if number of threads required is more than the maximum limit of
		// allowable threads then cap the number of threads

		threadCount=Math.min(numThreads, maxThreads);
		
		// We get the ceiling of numKeys/numThreads in order to spread out the
		// row keys evenly.
		// e.g. if numKeys=101 and maxRowCountPerQuery=50, it makes set of 34
		// keys to be queried at a time. numThreads= Ceil(101/50)=>3

		numKeysPerThread = (int) Math
				.ceil(numKeys / (double) numThreads);

		 // Default it to 1, so that all keys will be passed once, instead of breaking it
		numKeysPerThread=Math.max(numKeysPerThread, 1);
		
		//Check if there are any rowkeys 
		if(this.rowKeys!=null && this.rowKeys.size()>0)		{
			// split keys into subsets based on the above calculation
			returnKeys = Lists.partition(rowKeys, numKeysPerThread);
		}

		return returnKeys;

	}
657460
@Override
    public Enumeration<String> getKeys() {
        final Enumeration<?> enumeration = myProperties.elements();

        return new Enumeration<String>() {

            /**
             * Returns whether the {@link Enumeration} has more elements.
             *
             * @return True if the {@link Enumeration} has more elements; else, false.
             */
            @Override
            public boolean hasMoreElements() {
                return enumeration.hasMoreElements();
            }

            /**
             * Returns the next element in the {@link Enumeration}
             *
             * @return The next element in the {@link Enumeration}
             */
            @Override
            public String nextElement() {
                return (String) enumeration.nextElement();
            }
        };
    }
275075
public List<K> getKeys() {
        synchronized ( _map ) {
            return new java.util.ArrayList<K>( _map.keySet() );
        }
    }