Skip to main content

Add five methods in Quantity interface[Proposal]

  • From: Otávio Gonçalves de Santana < >
  • To:
  • Subject: Add five methods in Quantity interface[Proposal]
  • Date: Fri, 31 Oct 2014 17:36:12 -0200

I would like to propose to add four new comparatives methods in Quantity
interface:


   -   boolean isGreaterThan(Quantity<T> quantity);
   -   boolean isGreaterThanOrEqualTo(Quantity<T> quantity);
   -   boolean isLessThan(Quantity<T> quantity);
   -   boolean isLessThanOrEqualTo(Quantity<T> quantity);
   -   boolean isEquivalentTo(Quantity<T> quantity);

The implementation should convert to the same unit and than compare.
So:

Quantity<Time> oneHour = ...
Quantity<Time> sixtyMinutes = ...

Should return true, when: oneHour.isEquivalentTo(sixtyMinutes);
-- 
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


Add five methods in Quantity interface[Proposal]

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

Re: Add five methods in Quantity interface[Proposal]

Werner Keil 10/31/2014

Re: Add five methods in Quantity interface[Proposal]

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

Re: Add five methods in Quantity interface[Proposal]

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

Re: Add five methods in Quantity interface[Proposal]

Werner Keil 10/31/2014

Re: Add five methods in Quantity interface[Proposal]

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

Re: Add five methods in Quantity interface[Proposal]

Werner Keil 10/31/2014
 
 
Close
loading
Please Confirm
Close