Class QuantityBigDecimal<Unit extends MeasurementUnit<Unit>>

    • Constructor Detail

      • QuantityBigDecimal

        public QuantityBigDecimal​(BigDecimal value,
                                  Unit unit)
    • Method Detail

      • bigDecimalValue

        public BigDecimal bigDecimalValue()
        Description copied from interface: Quantity
        The numerical value of the quantity, as a BigDecimal.
        Returns:
        The value of the quantity.
      • bigIntegerValue

        public BigInteger bigIntegerValue()
        Description copied from interface: Quantity
        The numerical value of the quantity, as a BigInteger.
        Returns:
        The value of the quantity.
      • compareTo

        public int compareTo​(Quantity<Unit> other)
      • convertTo

        public Quantity<Unit> convertTo​(Unit unit)
        Description copied from interface: Quantity
        Convert this quantity to the given unit.
        Parameters:
        unit - The unit to convert to.
        Returns:
        The converted quantity.
      • doubleValue

        public double doubleValue()
        Description copied from interface: Quantity
        The numerical value of the quantity, as a Double.
        Returns:
        The value of the quantity.
      • floatValue

        public float floatValue()
        Description copied from interface: Quantity
        The numerical value of the quantity, as a Float.
        Returns:
        The value of the quantity.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • intValue

        public int intValue()
        Description copied from interface: Quantity
        The numerical value of the quantity, as an Integer.
        Returns:
        The value of the quantity.
      • longValue

        public long longValue()
        Description copied from interface: Quantity
        The numerical value of the quantity, as a Long.
        Returns:
        The value of the quantity.
      • unit

        public Unit unit()
        Description copied from interface: Quantity
        The unit of the quantity.
        Returns:
        The unit of the quantity.
      • value

        public Number value()
        Description copied from interface: Quantity
        The numerical value of the quantity.
        Returns:
        The value of the quantity.
      • equals

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object