Enum MoneyFormatterBuilder.SingletonPrinters

    • Constructor Detail

      • SingletonPrinters

        private SingletonPrinters()
    • Method Detail

      • values

        public static MoneyFormatterBuilder.SingletonPrinters[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (MoneyFormatterBuilder.SingletonPrinters c : MoneyFormatterBuilder.SingletonPrinters.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static MoneyFormatterBuilder.SingletonPrinters valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • print

        public void print​(MoneyPrintContext context,
                          java.lang.Appendable appendable,
                          BigMoney money)
                   throws java.io.IOException
        Description copied from interface: MoneyPrinter
        Prints part of a monetary value to the output appendable.

        The implementation determines what to append, which may be some or all of the data held in the BigMoney.

        The context is not a thread-safe object and a new instance will be created for each print. The context must not be stored in an instance variable or shared with any other threads.

        Specified by:
        print in interface MoneyPrinter
        Parameters:
        context - the context being used, not null
        appendable - the appendable to add to, not null
        money - the money to print, not null
        Throws:
        java.io.IOException - if an IO exception occurs