JSR 385 - A Units of Measurement API for the Java Community: (successor to JSR 363, replacing JSR 275, 108, 256 and earlier efforts like OSGi Measurements). Allowing experts to collaborate on source code evolving around Unit Standards like UCUM.
Everyone knows it. There is nothing worse than a not tailored content. Just think how frustrating is surfing a very complex website on the small screen of your cellular phone. You probably waste your time zooming and scrolling the pages, but, anyway, it's clear: if you want a comfortable user
... [More] experience you need dinamically adaptable contents according to hardware and browser specifications of your device.
That's the reason why Device Description Repositories (DDR) exist. These are databases that store a huge amount of information concerning mobile phones, tablets, Interactive TVs, set top boxes and any device having a Web browser, in order to allow developers to realize applications extremely enjoyable on each client. [Less]
JSR-275 specifies one or more Java packages for the programmatic handling of physical quantities and their expression as numbers of units. The specification includes:
Interfaces and abstract classes with methods for unit operations:
Checking of unit compatibility
Expression of a quantity in
... [More] various units
Arithmetic operations on units
Concrete classes implementing the standard types of units (such as base, supplementary, and derived) and unit conversions.
Classes for parsing unit specifications in string form and for formatting string representations of quantities.
A database of predefined units.
Developers frequently encounter the need to model units of measure, because objects in the real world are subject to these measures. When working with units, developers need to unders [Less]
Dealing with monetary values consistently in a large application is important.
Things that need to be considered are:-
precision rounding display formatting multi-currency database persistence
This collection of classes deals with the above issues.
The core Money class is a drop in
... [More] replacement for BigDecimal with added functionality to deal with monetary values. If offers the following features:-
Consistent precision JDBC and JPA database persistence Self awareness Logging
Self awareness?Sometimes you need to have processing rules for a specific monetary field. Let's say that VAT needs to be calculated consistently across multiple applications. When a Money object is instantiated it can be given a name. Straight away this is used in any log messages. A listener can register its interest in all Money objects of a given name. Now whenever the field is changed or stored the listener is invoked where it can reprocess the value or take other customer actions. [Less]
This site uses cookies to give you the best possible experience.
By using the site, you consent to our use of cookies.
For more information, please see our
Privacy Policy