Class Amount

java.lang.Object
java.lang.Number
java.math.BigDecimal
com.fourjs.report.facturx.Amount
All Implemented Interfaces:
Serializable, Comparable<BigDecimal>

public class Amount extends BigDecimal
Represents the Amount data type described in section 7.1.5, "Data types", of the Factur-X specification: a decimal with at most two digits after the decimal point.
See Also:
  • Method Details

    • fromString

      public static Amount fromString(String value)
      Returns an Amount holding the value parsed from a decimal string; surrounding whitespace is ignored.
      Parameters:
      value - the decimal value in string form, for example "1234.56"
      Returns:
      an Amount equal to value
    • valueOf

      public static Amount valueOf(BigDecimal value)
      Returns an Amount holding the given value.
      Parameters:
      value - the value
      Returns:
      an Amount equal to value
    • valueOf

      public static Amount valueOf(String value)
      Returns an Amount holding the value parsed from a decimal string; surrounding whitespace is ignored.
      Parameters:
      value - the decimal value in string form, for example "1234.56"
      Returns:
      an Amount equal to value
    • valueOf

      public static Amount valueOf(double value)
      Returns an Amount holding the given value.
      Parameters:
      value - the value
      Returns:
      an Amount equal to value
    • valueOf

      public static Amount valueOf(int value)
      Returns an Amount holding the given value.
      Parameters:
      value - the value
      Returns:
      an Amount equal to value