public static Comparator < MonetaryAmount > sortCurrencyUnitDesc ( ) { return new Comparator < MonetaryAmount > ( ) { @ Override public int compare ( MonetaryAmount o1 , MonetaryAmount o2 ) { return sortCurrencyUnit ( ) . compare ( o1 , o2 ) * - 1 ; } } ; }
Get a comparator for sorting CurrencyUnits descending .