I'm trying to use JSR-363 Quantity to manage some quantities in my application. I have some code similar to the following that I would like to convert to use the Quantity class.
Double volume1 = 14d;
Double volume2 = 18d;
Assert.isTrue(volume1 < volume2);
Using Quantity, I'm trying to find a way to compare two volumes, but there doesn't seem to be anything in the API that's equivalent to the simple comparison above!
Quantity<Volume> volume1 = Quantities.getQuantity(14d, Units.LITRE);
Quantity<Volume> volume2 = Quantities.getQuantity(18d, Units.LITRE);
Assert.isTrue(volume1 < volume2); <--- operator < doesn't exist
What am I missing?