Peter/Ian,
>Ian wrote:
>...
>> - suggestions for improvements.
>>
>> * It would seem fairly straightforward to introduce TimeDataset and
>> PeriodDataset classes to store instants in time and periods of elapsed
>> time respectively. Representing time and period in dedicated classes
>> offers the opportunity for the respective APIs to provide additional
>> methods (e.g. before, after, overlaps). Dedicated classes also reduces
>> the chance of integration troubles caused by teams misunderstanding
>> how, for example, an elapsed period is being represented in a
>> DoubleDataset (one team presumes floating point seconds, another
>> team presumes floating point millis).
>This ambiguity can be resolved with defining units metadata.
That's exactly what we did in the SE 8 implementation of JSR 363:
https://github.com/unitsofmeasurement/uom-se/blob/master/src/main/java/tec/uom/se/quantity/time/TimedData.java
Note, we do not use the units type system for the timestamp, since especially the notion of "Instant" or timestamp are out of scope for JSR 363 (or any other library like 275 which you already use) Instead "millis" as a long (for JVMs prior to Java 8) and at least in the SE 8 version the new Instant type are used. You can perfectly represent a Period or Duration (also provided in Java 8) using JSR 363 and javax.quantity.Time (in earlier versions that was still called Duration, we changed it to stick to more widely used standard term and avoid overlaps with 2 new classes in Java SE 8 doing the same thing ;-)
ICU4J also has a TimeUnitAmount (which is why we use that in UOMo backed by typesafe APIs like Unit-API 0.6, the successor to JSR-275 and precursor of JSR-363) based on a Measure type, it also captures a duration, but not a point in time (that's usually done by java.util.Date in ICU4J)
Werner