Enum MoneyFormatterBuilder.SingletonPrinters

java.lang.Object
java.lang.Enum<MoneyFormatterBuilder.SingletonPrinters>
org.joda.money.format.MoneyFormatterBuilder.SingletonPrinters
All Implemented Interfaces:
Serializable, Comparable<MoneyFormatterBuilder.SingletonPrinters>, java.lang.constant.Constable, MoneyPrinter
Enclosing class:
MoneyFormatterBuilder

private static enum MoneyFormatterBuilder.SingletonPrinters extends Enum<MoneyFormatterBuilder.SingletonPrinters> implements MoneyPrinter
Handles the singleton outputs.
  • Enum Constant Details

  • Constructor Details

    • SingletonPrinters

      private SingletonPrinters()
  • Method Details

    • values

      public static MoneyFormatterBuilder.SingletonPrinters[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static MoneyFormatterBuilder.SingletonPrinters valueOf(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:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • print

      public void print(MoneyPrintContext context, Appendable appendable, BigMoney money) throws 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:
      IOException - if an IO exception occurs
    • toString

      public String toString()
      Overrides:
      toString in class Enum<MoneyFormatterBuilder.SingletonPrinters>