Class Decimal

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

public class Decimal extends BigDecimal
Represents the basic Decimal data type described in section 7.1.5, "Data types", of the Factur-X specification: a decimal number used where no more specific amount, quantity or percentage type applies, such as the currency conversion rate.
See Also:
  • Method Details

    • fromString

      public static Decimal fromString(String value)
      Returns a Decimal 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:
      a Decimal equal to value
    • valueOf

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

      public static Decimal valueOf(String value)
      Returns a Decimal 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:
      a Decimal equal to value
    • valueOf

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

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