Releases: pjazdzyk/unitility
Releases · pjazdzyk/unitility
v2.4.2 - Added supported physical quantities registry
CHANGE LOG (01.09.2024):
- backward compatibility - COMPATBILE
- added supported quantities and associated unit registry, for easier incorporation with API, to show to user what are the currently supported units for each quantity symbols they have,
- added toUnit() method which now accepts also unit symbol as string,
- updated Quarkus platform to 3.14.1
- updated SpringBoot dependencies to 3.3.3
- other minor dependency updates and refactoring
v2.4.1 - Fixed jandex index plugin version
CHANGE LOG (26.05.2024):
- backward compatibility - COMPATBILE
- reduced jandex-index-plugin version to 3.1.8, as the 3.2.0 have some compatibility issues while reading the index in Quarkus 3.11.0 (despite that 3.2.0 is in their BOM).
v2.4.0 - New math operations: logarithms, trigonometry
CHANGE LOG (26.05.2024):
- backward compatibility - COMPATBILE
- added abs() function which will return an absolute value of current value in a current unit,
- added isCloseToZero() in two versions with epsilon specified or with default value of 1E-12. This function will return true for extremely small numbers, near the boundary of double type capability. This can be used in if() statements or predicates instead of isZero() to prevent false positive cases.
- added log(), log10() functions,
- added trigonometric functions for Angle quantity: sin(), sinh(), asin(), cos(), cosh(), acos(), tan(), tanh(), atan(), cot(), coth(), acot()
- fixed minor bugs & refactoring
- updated dependencies: SpringBoot 3.3.0, Quarkus platform: 3.11.0
v2.3.0 - Jakarta validation module
CHANGE LOG (26.02.2024):
- backward compatibility - NOT COMPATBILE
- added new module: Jakarta-validation. Which includes predefined constraint validator classes and associated annotations: PhysicalRange, PhysicalMin, PhysicalMax allowing for convenient PhysicalQuantity validation in web applications,
- simplified parsing mechanism, incorporated GeoParsingFactory into DefaultParsingFactory, reworked PhysicalQuantityDeserializer,
- added default unit specification. If during parsing no unit is provided, quantity will be resolved to its default unit,
- new unit: CFM (cubic feet per minute) for VolumetricFlow,
- fixed bug in divide() method (exception was thrown when numerator was 0, instead of denumerator),
- other minor bug fix and refactoring,
v2.2.0 - Parsing quantities unit symbol without square brackets
CHANGE LOG (02.01.2024):
- backward compatibility - COMPATIBLE
- quantities used in path params and query params does not have to be in square brackets. From now on this: 20[oC] and be replaced by 20oC. Square brackets used in path variables or query params were causing issues with Tomcat application servers.
- minor fixes and refactoring
v2.1.1 - Fixed arithmetic operations
CHANGE LOG (02.01.2024):
- backward compatibility - COMPATIBLE
- fixed arithmetic operations chainability
v2.1.0 - Add geographic quantities
CHANGE LOG (02.01.2024):
- backward compatibility - NOT COMPATIBLE
- added Latitude, Longitude, GeoCordinate and GeoDistance calculated based on Haversine equations,
- fixed arithmetic equations, they now work properly between different quantities sharing the same unit family,
- removed unsafe unchecked casting,
- reworked packages structure in jackson, spring and quarkus module
v2.0.0 - Frameworks support: Spring and Quarkus
CHANGE LOG (10.12.2023):
- backward compatibility - NOT COMPATIBLE
- changed project to multimodule structure, provided BOM module for dependency management,
- added support for Spring Boot (auto register Jackson serializers / deserializers, register converters for WebMVC),
- added support for Quarkus (auto register Jackson serializers / deserializers, register converters for JakartaParamProvider),
- PhysicalQuantity types can be now used in Query Params / Path Variables in web applications,
- refactor arithmetic operation methods to allow use of overloaded operators in Kotlin and Groovy,
- toFormattedString() now is refactored to toEngineeringFormat() and will output quantities in format: "20.12 [K]"
- minor clean-up and refactoring,
v1.2.0 - Simplified architecture, improved transformation methods
CHANGE LOG (03.09.2023):
- simplified architecture, removed generic type from Unit,
- changed PhysicalQuantity generic type from itself to Unit type,
- transformation methods returns implementation type not generic supertype, what allows for easy usage in streams via method references without any additional casting,
- equals method will now do equality check based on value in base units, so Units of Meters(1000) and Kilometers(1) will now be considered as equal,
- added / reworked toFormattedString methods with variable name, suffix and separator,
- minor fixes and refactoring.
v1.1.0 - Simplified property value access
CHANGE LOG (26.08.2023):
- removed to(..) methods for each unit, and replaced them with getIn(..) methods returning converted value as double for more convenient usage for calculations
- minor fixed and refactoring