Class Unit<Q extends Quantity>
- All Implemented Interfaces:
public abstract class Unit<Q extends Quantity>extends Objectimplements Serializable
This class represents a determinate
quantity(as of length, time, heat, or value) adopted as a standard of measurement.
It is helpful to think of instances of this class as recording the history by which they are created. Thus, for example, the string "g/kg" (which is a dimensionless unit) would result from invoking the method toString() on a unit that was created by dividing a gram unit by a kilogram unit. Yet, "kg" divided by "kg" returns
ONEand not "kg/kg" due to automatic unit factorization.
This class supports the multiplication of offsets units. The result is usually a unit not convertible to its
standard unit. Such units may appear in derivative quantities. For example \xc2\xb0C/m is an unit of gradient, which is common in atmospheric and oceanographic research.
Units raised at rational powers are also supported. For example the cubic root of "liter" is a unit compatible with meter.
Instances of this class are immutable.