Class Quantity

java.lang.Object
ome.units.quantity.Quantity
Direct Known Subclasses:
Angle, ElectricPotential, Frequency, Length, Power, Pressure, Temperature, Time

public abstract class Quantity
extends java.lang.Object
An abstract quantity. This represents a quantity (value) for a given unit system.
Since:
5.1
  • Constructor Summary

    Constructors 
    Constructor Description
    Quantity()  
  • Method Summary

    Modifier and Type Method Description
    abstract Unit<? extends Quantity> unit()
    Get the unit for this quantity.
    abstract java.lang.Number value()
    Get the numerical value of this quantity.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • value

      public abstract java.lang.Number value()
      Get the numerical value of this quantity.
      Returns:
      the value.
    • unit

      public abstract Unit<? extends Quantity> unit()
      Get the unit for this quantity.
      Returns:
      the unit.