List values in quality order.

@param e Enumeration of values with quality parameters
@return values in quality order.
760558
@Deprecated
    public static List<String> qualityList(Enumeration<String> e) {
        if (e == null || !e.hasMoreElements())
            return Collections.emptyList();

        QuotedQualityCSV values = new QuotedQualityCSV();
        while (e.hasMoreElements())
            values.addValue(e.nextElement());
        return values.getValues();
    }
1089385
public List<B> getOutcomesByProbability(A first) {
    if (counts.containsKey(first)) {
      Map<B, Double> sortedMap = MapUtils.reverse(MapUtils.sortByValue(counts.get(first)));
      return Lists.newArrayList(sortedMap.keySet());
    }
    return Collections.emptyList();
  }
571930
public List<FileCharacteristic> getCharacteristics() {
        long value = get(CHARACTERISTICS);
        List<FileCharacteristic> characteristics = FileCharacteristic
                .getAllFor(value);
        // ensurance
        assert characteristics != null;
        return characteristics;
    }
633248
public List getSortedEntries() {

        Map grouped = new HashMap();

        for (int i = 0; i < indexentry.size(); i++) {
            Entry e = (Entry) indexentry.get(i);
            String key = e.getKey();

            Entry master = (Entry) grouped.get(key);
            if (master != null) {
                master.addPageNumberAndTag(e.getPageNumber(), e.getTag());
            } else {
                e.addPageNumberAndTag(e.getPageNumber(), e.getTag());
                grouped.put(key, e);
            }
        }

        // copy to a list and sort it
        List sorted = new ArrayList(grouped.values());
        Collections.sort(sorted, comparator);
        return sorted;
    }
769823
protected static boolean contains (
        EqualityComparator eqc, Object[] list, Object element)
    {
        return (-1 != indexOf(eqc, list, element));
    }
308746
public java.util.List<java.nio.ByteBuffer> getBinaryListValues() {
        if (binaryListValues == null) {
            binaryListValues = new com.amazonaws.internal.SdkInternalList<java.nio.ByteBuffer>();
        }
        return binaryListValues;
    }
1215889
protected static void sort(double[] d, double[] e) {
        int i = 0;
        int n = d.length;
        for (int j = 1; j < n; j++) {
            double real = d[j];
            double img = e[j];
            for (i = j - 1; i >= 0; i--) {
                if (d[i] >= d[j]) {
                    break;
                }
                d[i + 1] = d[i];
                e[i + 1] = e[i];
            }
            d[i + 1] = real;
            e[i + 1] = img;
        }
    }
580712
public static <E extends Weighted> List<E> getSorted(Class<? extends E> service) {
        List<E> result = new ArrayList<E>(get(service));
        Collections.sort(result, WEIGHTED_COMPARATOR);
        return result;
    }
1223949
public void setEnumerationValues(java.util.Collection<EnumerationValue> enumerationValues) {
        if (enumerationValues == null) {
            this.enumerationValues = null;
            return;
        }

        this.enumerationValues = new java.util.ArrayList<EnumerationValue>(enumerationValues);
    }
103531
public Collection<String> getPossibleValues() {
    // Convert to string array
    final E[] enums = enumClass.getEnumConstants();
    ArrayList<String> values = new ArrayList<>(enums.length);
    for(E t : enums) {
      values.add(t.name());
    }
    return values;
  }
363159
private <T extends Enum<T>> Object[] getValidEnumConstants(Class<T> valueClass) {
        T[] constants = valueClass.getEnumConstants();
        if (!VersionedEnum.class.isAssignableFrom(valueClass)) {
            return constants;
        }

        List<T> valid = new ArrayList<T>(constants.length);
        for (T value : constants) {
            VersionedEnum versionedValue = (VersionedEnum) value;
            if (version >= versionedValue.getMinVersion()) {
                valid.add(value);
            }
        }

        return valid.toArray();
    }
873293
private static int[] sequence(int e) {
    int[] a = new int[e];
    for(int i = 0; i < a.length; i++) {
      a[i] = i;
    }
    return a;
  }
371415
List getOrderby()
    {
        List result = _getOrderby();
        Iterator iter = getCriteria().iterator();
        Object crit;

        while (iter.hasNext())
        {
            crit = iter.next();
            if (crit instanceof Criteria)
            {
                result.addAll(((Criteria) crit).getOrderby());
            }
        }

        return result;
    }
1059847
public static <E extends Comparable<E>> int sortedIndex(final List<E> list, final E value) {
        int index = 0;
        for (E elem : list) {
            if (elem.compareTo(value) >= 0) {
                return index;
            }
            index += 1;
        }
        return -1;
    }
955482
private static List<ClasspathElement> orderClasspathElements(
            final Collection<Entry<Integer, ClasspathElement>> classpathEltsIndexed) {
        final List<Entry<Integer, ClasspathElement>> classpathEltsIndexedOrdered = new ArrayList<>(
                classpathEltsIndexed);
        CollectionUtils.sortIfNotEmpty(classpathEltsIndexedOrdered, INDEXED_CLASSPATH_ELEMENT_COMPARATOR);
        final List<ClasspathElement> classpathEltsOrdered = new ArrayList<>(classpathEltsIndexedOrdered.size());
        for (final Entry<Integer, ClasspathElement> ent : classpathEltsIndexedOrdered) {
            classpathEltsOrdered.add(ent.getValue());
        }
        return classpathEltsOrdered;
    }
1258114
public List<K> getKeysSortedByValue( final Comparator<V> comparator ) {
        synchronized ( _map ) {
            @SuppressWarnings( "unchecked" )
            final
            Entry<K, ManagedItem<V>>[] a = _map.entrySet().toArray( new Map.Entry[_map.size()] );
            final Comparator<Entry<K, ManagedItem<V>>> c = new Comparator<Entry<K, ManagedItem<V>>>() {

                @Override
                public int compare( final Entry<K, ManagedItem<V>> o1, final Entry<K, ManagedItem<V>> o2 ) {
                    return comparator.compare( o1.getValue()._value, o2.getValue()._value );
                }

            };
            Arrays.sort(a, c);
            return new LRUCache.ArrayList<K, V>( a );
        }
    }
617333
public <E extends Enum<E>> List<E> getTypeList(Class<E> clz, E[] typeList) {
        if (typeList.length > 0) {
            return new ArrayList<>(Arrays.asList(typeList));
        } else {
            return new ArrayList<>(EnumSet.allOf(clz));
        }
    }