Quantity, abstract super class to match values and units and easily allow developers to manage the units a quantity-style value. This class also provides infrastructure for creating new types of quantity values and/or new sets of units.
This class mixes a static master list of quantity types and their affiliated units. Subclasses (such as Time
) can easily be created that provide a set of units for a different type of quantity.
The Quantity class also works with the QuantityPanel GUI component to provide a text entry for a unit that automatically tracks, displays and converts values into a user-settable application wide default unit.
This code was developed by NASA, Goddard Space Flight Center, Code 588 for the Scientist's Expert Assistant (SEA) project for Next Generation Space Telescope (NGST). See Time
or Wavelength
for an examples of quantity subclasses.
@version 2000.11.29
@author Sandy Grosvenor