Package org.joda.money.format
Enum MoneyFormatterBuilder.SingletonPrinters
- java.lang.Object
-
- java.lang.Enum<MoneyFormatterBuilder.SingletonPrinters>
-
- org.joda.money.format.MoneyFormatterBuilder.SingletonPrinters
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<MoneyFormatterBuilder.SingletonPrinters>
,MoneyPrinter
- Enclosing class:
- MoneyFormatterBuilder
private static enum MoneyFormatterBuilder.SingletonPrinters extends java.lang.Enum<MoneyFormatterBuilder.SingletonPrinters> implements MoneyPrinter
Handles the singleton outputs.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description LOCALIZED_SYMBOL
-
Constructor Summary
Constructors Modifier Constructor Description private
SingletonPrinters()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
print(MoneyPrintContext context, java.lang.Appendable appendable, BigMoney money)
Prints part of a monetary value to the output appendable.java.lang.String
toString()
static MoneyFormatterBuilder.SingletonPrinters
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static MoneyFormatterBuilder.SingletonPrinters[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
LOCALIZED_SYMBOL
public static final MoneyFormatterBuilder.SingletonPrinters LOCALIZED_SYMBOL
-
-
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 namejava.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 interfaceMoneyPrinter
- Parameters:
context
- the context being used, not nullappendable
- the appendable to add to, not nullmoney
- the money to print, not null- Throws:
java.io.IOException
- if an IO exception occurs
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Enum<MoneyFormatterBuilder.SingletonPrinters>
-
-