Skip to main content

Re: Remove "generic" multiply/divide operations from Quantity

  • From: Martin Desruisseaux < >
  • To:
  • Subject: Re: Remove "generic" multiply/divide operations from Quantity
  • Date: Sat, 18 Oct 2014 17:24:01 +0900
  • Organization: Geomatys

Le 17/10/14 11:51, Otávio Gonçalves de Santana a écrit :
> And considering the old method, what do avoid me to to something like
> that?: 
>
> Quantity<Time> time = ...; 
> Quantity<Length> length = ...; 
> Quantity<Mass> result = (Quantity<Mass>) time.multiply(length);
Nothing, but the user gets a "unsafe cast" warning while
UNITSOFMEASUREMENT-62 shutdown any warning, giving to the user the false
impression that is code is proved right.

The user can resolve the "unsafe cast" warning by using the (Mass) cast
instead of (Quantity<Mass>). There is no way however to make this cast
happen automatically in current Java (again, if you do not believe me,
see my proposal to restart the logical demonstration step-by-step).

    Martin



Re: Remove "generic" multiply/divide operations from Quantity

(continued)

Re: Remove "generic" multiply/divide operations from Quantity

Martin Desruisseaux 10/18/2014

Re: Remove "generic" multiply/divide operations from Quantity

Leonardo Lima 10/17/2014

Re: Remove "generic" multiply/divide operations from Quantity

Martin Desruisseaux 10/18/2014

Re: Remove "generic" multiply/divide operations from Quantity

Martin Desruisseaux 10/18/2014

Re: Remove "generic" multiply/divide operations from Quantity

Otávio Gonçalves de Santana 10/17/2014

Re: Remove "generic" multiply/divide operations from Quantity

Otávio Gonçalves de Santana 10/17/2014

Re: Remove "generic" multiply/divide operations from Quantity

Werner Keil 10/17/2014

Re: Remove "generic" multiply/divide operations from Quantity

Werner Keil 10/17/2014

Re: Remove "generic" multiply/divide operations from Quantity

Martin Desruisseaux 10/18/2014

Re: Remove "generic" multiply/divide operations from Quantity

Martin Desruisseaux 10/18/2014

Re: Remove "generic" multiply/divide operations from Quantity

Martin Desruisseaux 10/18/2014

Re: Remove "generic" multiply/divide operations from Quantity

Martin Desruisseaux 10/18/2014

Re: Remove "generic" multiply/divide operations from Quantity

Werner Keil 10/17/2014

Re: Remove "generic" multiply/divide operations from Quantity

Martin Desruisseaux 10/18/2014

Re: Remove "generic" multiply/divide operations from Quantity

Martin Desruisseaux 10/17/2014

Re: Remove "generic" multiply/divide operations from Quantity

Werner Keil 10/17/2014

Re: Remove "generic" multiply/divide operations from Quantity

Martin Desruisseaux 10/17/2014

Re: Remove "generic" multiply/divide operations from Quantity

Martin Desruisseaux 10/18/2014

Re: Remove "generic" multiply/divide operations from Quantity

Jean-Marie Dautelle 10/17/2014

Re: Remove "generic" multiply/divide operations from Quantity

Werner Keil 10/17/2014

Re: Remove "generic" multiply/divide operations from Quantity

Martin Desruisseaux 10/18/2014
 
 
Close
loading
Please Confirm
Close