Class Quantity

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

public class Quantity extends BigDecimal
Represents the Quantity data type described in section 7.1.5, "Data types", of the Factur-X specification: a decimal number of units.
See Also:
  • Method Details

    • fromString

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

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

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

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

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