Skip to content

Releases: pjazdzyk/unitility

v2.4.1 - Fixed jandex index plugin version

26 May 11:59
Compare
Choose a tag to compare

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

26 May 07:53
Compare
Choose a tag to compare

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

26 Feb 17:31
Compare
Choose a tag to compare

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

28 Jan 15:30
Compare
Choose a tag to compare

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

02 Jan 18:47
Compare
Choose a tag to compare

CHANGE LOG (02.01.2024):

  • backward compatibility - COMPATIBLE
  • fixed arithmetic operations chainability

v2.1.0 - Add geographic quantities

02 Jan 17:16
Compare
Choose a tag to compare

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

10 Dec 19:04
Compare
Choose a tag to compare

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

03 Sep 18:35
abd605b
Compare
Choose a tag to compare

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

26 Aug 17:04
7a0cf19
Compare
Choose a tag to compare

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

v1.0.2 - Transformation methods and logic operations

06 Aug 16:49
Compare
Choose a tag to compare

CHANGE LOG (06.08.2023):

  • new transformation methods: add, subtract, multiply, divide,
  • new logic operation methods: isLowerThan(), isGreaterThan(), isEqualOrLowerThan(), isEqualOrGreaterThan()
  • add convenient methods for getting value of most popular units, for ie: temperature.getValueAsCelsius();
  • fixed minor bugs + refactoring