Skip to main content

[jsr363-experts] Re: Quantity.doubleValue(...) ?

  • From: Werner Keil < >
  • To: " " < >
  • Subject: [jsr363-experts] Re: Quantity.doubleValue(...) ?
  • Date: Mon, 15 Dec 2014 16:26:47 +0100

There are no classes in the API aside from exceptions (though if it's never
going to leave RI or SE port, one could explore turning Measurement into a
simple class, though the interface makes usage by a future Java value type
easier than a class that later has to be changed into something else;-) in
the API so if you refer to the question of Measurement extending something
vs. "composition" as we do now, that's why the Fowler analysis and
reference is very vital and helpful.

Not every framework does it exactly the same, OSGi mixed Measurement and
Quantity (especially the timestamp is event-based and not relevant to say
comparing "2 Metre" with "200 Centimetre") into one class, and I don't even
want to start about the weird twisted hierarchy of Ford's OpenXC (while it
has the best intentions, probably among reasons for seemingly low
acceptance by any other car maker;-)
I think based on separating concerns it makes sense, so at the end of the
day it matters less, if it's an interface, class or where we would position
it.

Werner



On Mon, Dec 15, 2014 at 4:08 PM, Martin Desruisseaux <
>
 wrote:
>
>  Le 15/12/14 22:03, Werner Keil a écrit :
>
>    (...snip...) The concept of base units exists no matter how we
>> represent it. Whether a particular implementation decides to define a
>> BaseUnit class for holding that concept or not is an implementation
>> details.
>>
> As there are so many possible systems (custom implementations like
> "Health" or "Fitness" or country-specific ones, what should they all return
> there?
>
> They would return their own set of base units, which are different than
> the SI ones.
>
> Base units is at the very core of the whole JSR-363 project, even if there
> is no explicit BaseUnit type (because this is not necessary): all
> SystemOfUnits is defined by a small set of base units, from which other
> units are derived.
>
>
>   (...snip...) it is not impossible to pull the Measurement interface
> into the API if found appropriate.
> Last time it was discussed, it seems most who participated felt it should
> be in the RI.
>
> But I do *not* want to pull the Measurement interface into the API! It is
> too problematic to define its right position in a hierarchy of classes. But
> we do not need to have a Measurement interface in order to talk about
> measurement! Repeating what I said in my previous email: we do not need to
> have an Accuracy interface in order to talk about accuracy!
>      Martin
>
>


[jsr363-experts] Quantity.doubleValue(...) ?

Martin Desruisseaux 12/15/2014

[jsr363-experts] Re: Quantity.doubleValue(...) ?

Werner Keil 12/15/2014

[jsr363-experts] Re: Quantity.doubleValue(...) ?

Werner Keil 12/15/2014

[jsr363-experts] Re: Quantity.doubleValue(...) ?

Martin Desruisseaux 12/15/2014

[jsr363-experts] Re: Quantity.doubleValue(...) ?

Werner Keil 12/15/2014

[jsr363-experts] Re: Quantity.doubleValue(...) ?

Martin Desruisseaux 12/15/2014

[jsr363-experts] Re: Quantity.doubleValue(...) ?

Werner Keil 12/15/2014

[jsr363-experts] Re: Quantity.doubleValue(...) ?

Martin Desruisseaux 12/15/2014

[jsr363-experts] Re: Quantity.doubleValue(...) ?

Werner Keil 12/15/2014

[jsr363-experts] Re: Quantity.doubleValue(...) ?

Martin Desruisseaux 12/15/2014

[jsr363-experts] Re: Quantity.doubleValue(...) ?

Werner Keil 12/15/2014

[jsr363-experts] Re: Quantity.doubleValue(...) ?

Martin Desruisseaux 12/15/2014

[jsr363-experts] Re: Quantity.doubleValue(...) ?

Martin Desruisseaux 12/16/2014

[jsr363-experts] Re: Quantity.doubleValue(...) ?

Leonardo Lima 12/16/2014

[jsr363-experts] Re: Quantity.doubleValue(...) ?

Martin Desruisseaux 12/16/2014
 
 
Close
loading
Please Confirm
Close