Releases: point85/caliper
Unit of Measure Java Library
Claude Sonnet 4.5 changes:
Performance Improvements
Prefix.java - Optimized prefix lookup:
Changed from O(n) linear search to O(1) HashMap lookup in fromName()
Added nameMap for fast name-based lookups
Made prefix list unmodifiable to prevent external modification
UnitOfMeasure.java - Eliminated unnecessary boxing:
Replaced Double.valueOf().compareTo() with Double.compare() in 4 locations
Added initial capacity to HashMap in multiplyOrDivide() method
Added initial capacity to Reducer's terms HashMap (16 elements)
Quantity.java - Optimized comparisons:
Replaced Double.valueOf().compareTo() with Double.compare() in compare() method
Added initial capacity to ArrayList in convert(List) method
MeasurementSystem.java - Collection optimization:
Added initial capacity (32) to ArrayList in getUnitsOfMeasure() method
UnitType.java - Immutability improvement:
Made typeMap unmodifiable using Collections.unmodifiableMap()
Added initial capacity calculation for HashMap
Bug Fixes
Prefix.java - Null safety:
Added null check in fromName() method to prevent NullPointerException
UnitOfMeasure.java - Null safety in equals():
Added null checks for getAbscissaUnit() and getSymbol() to prevent NullPointerException
Improved defensive programming in equality checks
Unit of Measure Library
- Constant: fixed AVOGADRO typo
- MeasurementSytem: defined EPSILON for floating point precision; made ctor private
- Prefix: made prefixes a synchronized list; peta typo; used EPSILON in fromFactor() comparison
- Quantity: used EPSILON in equals() comparison; added BigDecimal case in createAmount(); checked for division by 0 in divide(double)
- UnitOfMeasure: synchronized setConversion()
Units of Measure Library
- Created a Maven repository at io.github.point85.caliper:
- Upgraded gson to version 2.10.1
- Upgraded hamcrest to 2.2
- Removed unused Maven dependencies
Units of Measure Library
Removed JavaFX test code
Upgraded to Java 11
Upgraded slf4j to version 1.7.26
Upgraded junit to version 4.13.2
Caliper Project
- redefined inHg pressure UOM
- updated HSQL database to version 2.7.1
Caliper Unit of measure project
Fixed a caching issue with UOM conversions
Unit of measure project
Fixed troy ounce conversion issue
Units of Measure
Added a multiple unit conversion method to Quantity
Code enhancements as per SonarLint recommendations
Caliper units of measurement
- Code changes per SonarLint suggestions
- Added a Quantity constructor
Caliper Units of Measure
- Converted to a Maven project only
- Upgraded to JPA 2.2