Get a comparator for sorting amount by number value descending.
@return the Comparator to sort by number in descending way, not null.
515028
public static Comparator<MonetaryAmount> sortNumberDesc(){
	        return new Comparator<MonetaryAmount>() {
	            @Override
	            public int compare(MonetaryAmount o1, MonetaryAmount o2) {
	                return sortNumber().compare(o1, o2) * -1;
	            }
	        };
	    }
542908
@ReplacedBy("com.google.common.collect.Ordering.natural().nullsLast()")
    public static final <T extends Comparable<?>> Comparator<T> comparable ()
    {
        @SuppressWarnings("unchecked") Comparator<T> comp = (Comparator<T>)COMPARABLE;
        return comp;
    }
1252297
@SuppressWarnings({ "unchecked", "rawtypes" })
    static final <R> Comparator<Cell<R>> comparator() {
        return (Comparator<Cell<R>>) (Comparator) COMPARATOR;
    }
195967
public static <T> OrderBy<T> convertToEbeanOrderBy(Sort sort) {
        if (sort == null) {
            return null;
        }
        List<String> list = new ArrayList<>();

        Iterator<Sort.Order> orderIterator = sort.iterator();
        while (orderIterator.hasNext()) {
            Sort.Order so = orderIterator.next();
            list.add(so.getProperty() + " " + so.getDirection());
        }
        return new OrderBy<T>(StringUtils.collectionToCommaDelimitedString(list));
    }
614273
function(comparator, comparatorNullsFirst)
  {
    var cmp = comparator ? createComparator( comparator, comparatorNullsFirst ) : this.comparator;

    if ( !isSorted( cmp, this ) )
    {
      this.map.sort( cmp );

      this.trigger( Collection.Events.Sort, [this] );
    }

    return this;
  }
1283797
public static <T> Iterator<T> getSortedIterator (Iterable<T> coll, Comparator<T> comparator)
    {
        return getSortedIterator(coll.iterator(), comparator);
    }
219639
public static <K> Matcher<Iterable<K>> sorted(final Comparator<K> comparator) {
        return IsSortedIterableWithComparator.sorted(comparator);
    }
1139450
public static <C extends Comparable> Ordering<Range<C>> reverseOrderingByLowerEndpoint() {
        Ordering<Range<C>> orderingByLowerEndpoint = orderingByLowerEndpoint();
        return orderingByLowerEndpoint.reverse();
    }
440561
public static <E> Ordering<Multiset.Entry<E>>
  byCountDescendingThenItemAscendingOrdering(Comparator<? super E> itemComparator) {
    final Ordering<Multiset.Entry<E>> byCount = byCountOrdering();
    final Ordering<Multiset.Entry<E>> byCountReversed = byCount.reverse();
    final Ordering<Multiset.Entry<E>> byElement = byElementOrdering(itemComparator);
    return byCountReversed.compound(byElement);
  }
1003083
public Comparator<S> comparator() {
        if (mChunkMatcher == null) {
            return mChunkSorter;
        }
        return new Comparator<S>() {
            public int compare(S a, S b) {
                int result = mChunkMatcher.compare(a, b);
                if (result == 0) {
                    result = mChunkSorter.compare(a, b);
                }
                return result;
            }
        };
    }
679154
public static function getThousandsSeparator()
	{
		if (!isset(self::$_thousandsSeparator)) {
			$localeconv = localeconv();
			self::$_thousandsSeparator = ($localeconv['thousands_sep'] != '')
				? $localeconv['thousands_sep'] : $localeconv['mon_thousands_sep'];

			if (self::$_thousandsSeparator == '') {
				// Default to .
				self::$_thousandsSeparator = ',';
			}
		}
		return self::$_thousandsSeparator;
	}
466175
protected Token fetchNumber() {
        Token result = Token.create(Token.TokenType.INTEGER, input.current());
        result.addToContent(input.consume());
        while (input.current().isDigit() || input.current().is(decimalSeparator) || (input.current()
                                                                                          .is(groupingSeparator)
                                                                                     && input.next().isDigit())) {
            if (input.current().is(groupingSeparator)) {
                result.addToSource(input.consume());
            } else if (input.current().is(decimalSeparator)) {
                if (result.is(Token.TokenType.DECIMAL)) {
                    problemCollector.add(ParseError.error(input.current(), "Unexpected decimal separators"));
                } else {
                    Token decimalToken = Token.create(Token.TokenType.DECIMAL, result);
                    decimalToken.setContent(result.getContents() + effectiveDecimalSeparator);
                    decimalToken.setSource(result.getSource());
                    result = decimalToken;
                }
                result.addToSource(input.consume());
            } else {
                result.addToContent(input.consume());
            }
        }

        return result;
    }
1362134
protected SortOrder convertSortOrder() {
        final String sortOrder = getSortOrder();
        if (sortOrder == null) {
            return SortOrder.UNSORTED;
        }
        else {
            final SortOrder result = SortOrder.valueOf(sortOrder.toUpperCase(Locale.ENGLISH));
            return result;
        }
    }
1058946
public static final KeyPressHandler getNumericWithSeparatorsKeyPressHandler() { // NOPMD
    if (HandlerFactory.numericWsKeyPressHandler == null) {
      synchronized (NumericWithSeparatorsKeyPressHandler.class) {
        if (HandlerFactory.numericWsKeyPressHandler == null) {
          HandlerFactory.numericWsKeyPressHandler = new NumericWithSeparatorsKeyPressHandler();
        }
      }
    }
    return HandlerFactory.numericWsKeyPressHandler;
  }
83024
public SortingParams nosort() {
    params.add(BY.raw);
    params.add(NOSORT.raw);
    return this;
  }
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 );
        }
    }
352993
public static <T> Comparator<T> comparator(CheckedComparator<T> comparator) {
        return Unchecked.comparator(comparator, Unchecked.RETHROW_ALL);
    }