Enum AmountRepresentation

java.lang.Object
java.lang.Enum<AmountRepresentation>
com.fasterxml.jackson.datatype.jodamoney.AmountRepresentation
All Implemented Interfaces:
Serializable, Comparable<AmountRepresentation>, java.lang.constant.Constable

public enum AmountRepresentation extends Enum<AmountRepresentation>
Enumeration of available strategies used by MoneySerializer and MoneyDeserializer to represent amounts of Money.
  • Enum Constant Details

    • DECIMAL_NUMBER

      public static final AmountRepresentation DECIMAL_NUMBER
      Decimal number representation, where amount is (de)serialized as decimal number equal to Money's amount, e.g. 12.34 for Money.parse("EUR 12.34").
      See Also:
    • DECIMAL_STRING

      public static final AmountRepresentation DECIMAL_STRING
      Decimal string representation, where amount is (de)serialized as string containing decimal number equal to Money's amount, e.g. "12.34" for Money.parse("EUR 12.34").
      See Also:
    • MINOR_CURRENCY_UNIT

      public static final AmountRepresentation MINOR_CURRENCY_UNIT
      Minor currency unit representation, where amount is (de)serialized as long integer equal to Money's amount expressed in minor currency unit, e.g. 1234 for Money.parse("EUR 12.34"), 12345 for Money.parse("KWD 12.345") or 12 for Money.parse("JPY 12").
      See Also:
  • Constructor Details

    • AmountRepresentation

      private AmountRepresentation()
  • Method Details

    • values

      public static AmountRepresentation[] 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 AmountRepresentation 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