Class CurrencyDemo


  • public class CurrencyDemo
    extends java.lang.Object
    Demonstration code to illustrate how to obtain ICU 2.6-like currency behavior using pre-ICU 2.6 ICU4J.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) static java.util.Map hackData  
    • Constructor Summary

      Constructors 
      Constructor Description
      CurrencyDemo()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) static NumberFormat getCurrencyFormat​(Currency currency, java.util.Locale displayLocale, boolean ICU26)  
      static void main​(java.lang.String[] args)  
      (package private) static void testFormatHack​(boolean quiet)
      Walk through all locales and compare the output of the ICU26 currency format with the "hacked" currency format.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • hackData

        static java.util.Map hackData
    • Constructor Detail

      • CurrencyDemo

        public CurrencyDemo()
    • Method Detail

      • main

        public static void main​(java.lang.String[] args)
      • getCurrencyFormat

        static NumberFormat getCurrencyFormat​(Currency currency,
                                              java.util.Locale displayLocale,
                                              boolean ICU26)
      • testFormatHack

        static void testFormatHack​(boolean quiet)
        Walk through all locales and compare the output of the ICU26 currency format with the "hacked" currency format.
        Parameters:
        quiet - if true, only display discrepancies. Otherwise, display all results.