Class Quantity

  • All Implemented Interfaces:
    Serializable

    public class Quantity
    extends Object
    implements Serializable
    Quantity is fixed point representation of a number. It provides convenient marshalling/unmarshalling in JSON or YAML, in addition to String or getAmountInBytes accessors.
    See Also:
    Serialized Form
    • Constructor Detail

      • Quantity

        public Quantity()
        No args constructor for use in serialization
      • Quantity

        public Quantity​(String amount)
        Single argument constructor for setting amount.
        Parameters:
        amount - amount of quantity specified.
      • Quantity

        public Quantity​(String amount,
                        String format)
        Double argument constructor for setting amount along with format.
        Parameters:
        amount - amount of quantity specified
        format - format for the amount.