Skip to main content

Re: AbstractQuantity's class

  • From: Werner Keil < >
  • To: " " < >
  • Subject: Re: AbstractQuantity's class
  • Date: Sun, 14 Sep 2014 13:54:51 +0200

If we found a good name along the lines of "Amount" in JScience (though we
likely need an abstract base class, too) we could apply something similar.

While the MonetaryAmount is an abstraction over just one of few concrete
implementations, the wide range of use cases in science, health, smart
energy or simply measuring people and clothes means we must not restrict it
as much here. TemporalAmount in JSR 310 as mentioned earlier in JIRA is a
chimera, it is acutally a LIST of time quantities like "1 Minute" or "30
Seconds", while the JavaMoney API element is a more genuine case of a
single amount. RI or Lib deals with compound values.
Quantity has be a key concept of the API, but nothing keeps us from adding
or renaming an implementing type to "QuantityAmount" or similar.

Eclipse UOMo did that, too:
https://github.com/eclipse/uomo/blob/master/bundles/org.eclipse.uomo.units/src/main/java/org/eclipse/uomo/units/QuantityAmount.java

We probably best play with these ideas at JavaOne;-)

Regards,
Werner

On Sun, Sep 14, 2014 at 1:32 PM, Werner Keil 
< >
 wrote:

> Sorry but we had that confusion with JSR 275, so ONE Measurement is
> enough, we must not have Measure implements Measurement, that would just be
> a mess.
>
> JScience called that "Amount", but you see a lot of very popular projects
> (SpringFramework) doing exactly the same. There are Abstract*.valueOf() or
> similar constructions.
>
> Regards,
> Werner
>
>  Werner Keil | JCP Executive Committee Member, JSR 363 Co Spec Lead |
> Eclipse UOMo Lead, Babel Language Champion | Apache Committer | Java
> Godfather
>
> Twitter @wernerkeil | @UnitAPI | @JSR354 | #EclipseUOMo | #Java_Social |
> #DevOps
> Skype werner.keil | Google+ gplus.to/wernerkeil
>
> * JavaZone 2014: 9-11 Sep 2014, Oslo, Norway. Werner Keil, JCP EC Member,
> JSR 363 Spec Lead will present "JSR 363 - The Answer to Life Science and
> the Internet of Everything"
>
> * JavaOne 2014: Sep 30, San Francisco, USA, Werner Keil, JCP EC Member,
> JSR 354 EG Member will host "Java and Digital Currencies, Friend or FOE"
>
> * JMaghreb 3.0: 4-6 Nov 2014, Casablanca, Morocco. Werner Keil, JCP EC
> Member, JSR 363 Spec Lead, DevOps Guy will present "Triple-E' class
> DevOps", "JSR 363"
>
> * ApacheCon Europe: 17 Nov 2014, Budapest, Hungary. Werner Keil, JCP EC
> Member, Apache DeviceMap Committer will present "Apache DeviceMap"
>
> * Mobile Developer Conference kompakt: 18 Nov 2014, Hamburg, Germany.
> Werner Keil, JCP EC Member, Apache DeviceMap Committer will present "Apache
> DeviceMap" (GER)
>
> On Sun, Sep 14, 2014 at 12:29 PM, Otávio Gonçalves de Santana <
>  >
>  wrote:
>
>> Hi Guys.
>> How is going?
>>
>> I believe we have a possible problem with nomeclature in
>>  AbstractQuantity's class, looking this example:
>>
>> Quantity<Length> metre = AbstractQuantity.of(10, SI.METRE);
>> Quantity<Length> foot =  metre.to(US.FOOT);
>>
>> IMHO, Abstract* is not a good name to a factory, maybe just Measure, so
>> will:
>>
>> Quantity<Length> metre = Meansure.of(10, SI.METRE);
>> Quantity<Length> foot =  metre.to(US.FOOT);
>>
>> WDYF?
>>
>> --
>> Otávio Gonçalves de Santana
>>
>> blog:     http://otaviosantana.blogspot.com.br/
>> twitter: http://twitter.com/otaviojava
>> site:     *http://about.me/otaviojava ;<http://about.me/otaviojava>*
>> 55 (11) 98255-3513
>>
>>
>


AbstractQuantity's class

Otávio Gonçalves de Santana 09/14/2014

Re: AbstractQuantity's class

Werner Keil 09/14/2014

Re: AbstractQuantity's class

Werner Keil 09/14/2014

Re: AbstractQuantity's class

Otávio Gonçalves de Santana 09/14/2014

Re: AbstractQuantity's class

Werner Keil 09/14/2014

Re: AbstractQuantity's class

Otávio Gonçalves de Santana 09/14/2014

Re: AbstractQuantity's class

Werner Keil 09/14/2014

Re: AbstractQuantity's class

Otávio Gonçalves de Santana 09/15/2014

Re: AbstractQuantity's class

Leonardo Lima 09/15/2014

Re: AbstractQuantity's class

Werner Keil 09/15/2014

RE: AbstractQuantity's class

Legrand, Karen 09/15/2014

RE: AbstractQuantity's class

Otávio Gonçalves de Santana 09/15/2014

Re: AbstractQuantity's class

Werner Keil 09/15/2014
 
 
Close
loading
Please Confirm
Close