Overview of the datum package.

Note: package consists of six object types: Units, UnitsConverter, 
   Datums, DatumFormatters, DatumVectors, and DatumRanges.

Units tag primative data types to give them meaning and utility between 
parts of the system.  In general, no data is passed through a public interface
without being tagged by a unit.  Examples of units are second, microseconds 
since midnight Jan 1 2000, Penny, Degree, or dB.

UnitsConverter converts Datums and Unit-tagged doubles to another Unit base.

Datums are generally a primative data type plus a unit, and represent the
atoms of data that are passed around the system.  Examples are 
"5.2 Seconds" or "2003-April-5 3:11:00.002234."

DatumFormatters take a datum and represent it as a string.  Generally the
Unit of the datum specifies the DatumFormatter.  So for example the
toString method of a datum looks like:
  generally getUnits().getDatumFormatter().format(this);

DatumVectors are an array of Datums, essentially an array of a primative
type plus a Unit.  For example, the YTags of a spectrogram could be precisely
described with a DatumVector.

DatumRange.  A DatumRange is provided as a means to carry an ordered pair of Datums
representing an interval in a Unit's space.  For example, "July 1994" is a 
DatumRange, as is "0-1000 microseconds."   Note that this should not be used to
represent an uncertainly as the ends are precisely known, and there may be a 
Datum class that supports uncertainty.

Goals for datum package:

1. Orthogonality between Units and Datums.  
2. Extensibility to include new types of datums.  For example, a limited-precision
   Datum.
3. Ability to back datum with different data types appropriate to the application.
   (penny count represented with long, low-precision number stored with float.)
4. Speed.  Overhead should not greatly impact computation speed.  It is assumed 
   that short-lived objects have little impact on performance.  And that the memory
   consumed by short-lived objects is nominal.

Solution statements:

1. Units apply typeness to the primative type.
2. Datums implement arithmetic operations.
3. Datums provide views of the data:
     double u= datum.doubleValue(units);
   Or do units provide views of the data in the context of a unit:
     double u= units.doubleValue(datum);
     String s= units.stringValue(datum);
       units.getDatumFormatter().format(datum,units);
4. Units create Datums:
     Datum d= units.createDatum( double );
     Datum d= units.createDatum( double, double resolution );

Examples of problems:
   Units.pennies
   Units.radians   
   Units.us2000 backed by long
   
   Datum.Double backed by a double   


class Datum.Double {
   Units units;
   double value;
   double certainty;
}




   








