-
Notifications
You must be signed in to change notification settings - Fork 614
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Java units API rewrite #6958
Java units API rewrite #6958
Commits on Aug 22, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 5112c36 - Browse repository at this point
Copy the full SHA 5112c36View commit details -
Flatten units into discrete types
Java's type system is incapable of handling these with generics, so we need to write all the discrete cases ourselves
Configuration menu - View commit details
-
Copy full SHA for 869a2c4 - Browse repository at this point
Copy the full SHA 869a2c4View commit details -
Rename
IMutable
toMutableMeasure
Generic arguments are 100% breaking from the v1 API Fix some missing imports Add`Unit.of`, `Unit.ofBaseUnits`, and `Unit.mutable` methods returning wildcarded generic types. Subclasses should override these to sharpen the signatures to the unit-specific measurement implementations like `Angle` and `Distance`.
Configuration menu - View commit details
-
Copy full SHA for fb61fc7 - Browse repository at this point
Copy the full SHA fb61fc7View commit details -
Configuration menu - View commit details
-
Copy full SHA for cd04e93 - Browse repository at this point
Copy the full SHA cd04e93View commit details -
Split into mutable and immutable variants
Allows immutables to be records and easily converted to value types if valhalla ever lands
Configuration menu - View commit details
-
Copy full SHA for 485135a - Browse repository at this point
Copy the full SHA 485135aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 158c576 - Browse repository at this point
Copy the full SHA 158c576View commit details -
Move measure interfaces to their own package
Reduces clutter in the root `units` package
Configuration menu - View commit details
-
Copy full SHA for fd0d2d1 - Browse repository at this point
Copy the full SHA fd0d2d1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 29b1e68 - Browse repository at this point
Copy the full SHA 29b1e68View commit details -
Configuration menu - View commit details
-
Copy full SHA for 542b0f6 - Browse repository at this point
Copy the full SHA 542b0f6View commit details -
Add generic constructor to trapezoid profile constraints
Instead of separate discrete constructors for different unit types
Configuration menu - View commit details
-
Copy full SHA for a44bf47 - Browse repository at this point
Copy the full SHA a44bf47View commit details -
Configuration menu - View commit details
-
Copy full SHA for 38d18ba - Browse repository at this point
Copy the full SHA 38d18baView commit details -
Add math operator overloads for all known dimensions
Add code generation for the measure implementations (eg Distance, ImmutableDistance, and MutDistance) due to the sheer volume of manual work that would have been required to write (or copy/paste) ten thousand lines of code Reconsolidate the measure implementations into a single package Rename `negate` to `unaryMinus` and some variants of `per` to `divide` for consistent naming. Overloads of `divide` may be renamed to `per`; TBD Rename `Ratio` measure type back to `Per` to ease code generation. May be renamed back to `Ratio` or `Quotient`; TBD
Configuration menu - View commit details
-
Copy full SHA for d23b27f - Browse repository at this point
Copy the full SHA d23b27fView commit details -
Checkstyle and PMD are disabled for generated files
Configuration menu - View commit details
-
Copy full SHA for 0e6c8d0 - Browse repository at this point
Copy the full SHA 0e6c8d0View commit details -
Linting, documentation, and seal nonextensible unit types
Add `per(TimeUnit)` abstract method to Unit for subclasses to implement. Often returns a velocity
Configuration menu - View commit details
-
Copy full SHA for acfea50 - Browse repository at this point
Copy the full SHA acfea50View commit details -
Configuration menu - View commit details
-
Copy full SHA for ab96bf3 - Browse repository at this point
Copy the full SHA ab96bf3View commit details -
Instead of relying on the default record implementation for immutable types and the autogenerated logic for mutables, check for measure equivalence This allows for comparisons of eg `Measure<DistanceUnit>` to `ImmutableDistance` to `MutDistance` to all work correctly
Configuration menu - View commit details
-
Copy full SHA for 04cb95a - Browse repository at this point
Copy the full SHA 04cb95aView commit details -
Configuration menu - View commit details
-
Copy full SHA for d44ac50 - Browse repository at this point
Copy the full SHA d44ac50View commit details -
Consistent API in unit subclasses for non-inherited methods
For example, `convertFrom` cannot be declared in the base unit class and must therefore be declared and implemented in every subclass, and `getBaseUnit` must be overridden to return the correct type in every subclass Make composite units consistently use the correct base units
Configuration menu - View commit details
-
Copy full SHA for 88ecf04 - Browse repository at this point
Copy the full SHA 88ecf04View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0405dff - Browse repository at this point
Copy the full SHA 0405dffView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2f7cd05 - Browse repository at this point
Copy the full SHA 2f7cd05View commit details -
Configuration menu - View commit details
-
Copy full SHA for 90da7a9 - Browse repository at this point
Copy the full SHA 90da7a9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4c71208 - Browse repository at this point
Copy the full SHA 4c71208View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0e7a055 - Browse repository at this point
Copy the full SHA 0e7a055View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6fefb1c - Browse repository at this point
Copy the full SHA 6fefb1cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1239fb6 - Browse repository at this point
Copy the full SHA 1239fb6View commit details -
Configuration menu - View commit details
-
Copy full SHA for a5c821c - Browse repository at this point
Copy the full SHA a5c821cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 469d8dc - Browse repository at this point
Copy the full SHA 469d8dcView commit details -
Configuration menu - View commit details
-
Copy full SHA for ef5b23e - Browse repository at this point
Copy the full SHA ef5b23eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 10081d6 - Browse repository at this point
Copy the full SHA 10081d6View commit details -
Configuration menu - View commit details
-
Copy full SHA for e20ee8e - Browse repository at this point
Copy the full SHA e20ee8eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3d5134a - Browse repository at this point
Copy the full SHA 3d5134aView commit details
Commits on Aug 28, 2024
-
Configuration menu - View commit details
-
Copy full SHA for a08c350 - Browse repository at this point
Copy the full SHA a08c350View commit details -
Configuration menu - View commit details
-
Copy full SHA for 65e2c8c - Browse repository at this point
Copy the full SHA 65e2c8cView commit details -
Add a
timesConversionFactor()
methodCan't overload `times()` due to type erasure
Configuration menu - View commit details
-
Copy full SHA for d7f42e1 - Browse repository at this point
Copy the full SHA d7f42e1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 055b409 - Browse repository at this point
Copy the full SHA 055b409View commit details -
Configuration menu - View commit details
-
Copy full SHA for bbc7784 - Browse repository at this point
Copy the full SHA bbc7784View commit details -
Configuration menu - View commit details
-
Copy full SHA for ed9204a - Browse repository at this point
Copy the full SHA ed9204aView commit details -
Remove Force.mult(Distance) -> Energy function for now
Not as easy to combine into energy as torque, and it's a less common usecase Rename existing function to `multAsTorque` for clarity Add equivalent torque multiplication function to the Force class
Configuration menu - View commit details
-
Copy full SHA for eedcea4 - Browse repository at this point
Copy the full SHA eedcea4View commit details
Commits on Sep 2, 2024
-
Configuration menu - View commit details
-
Copy full SHA for f1d9dc2 - Browse repository at this point
Copy the full SHA f1d9dc2View commit details
Commits on Sep 3, 2024
-
Use
Measure
input parameters consistentlyAllows for wider compatibility with results of math operations
Configuration menu - View commit details
-
Copy full SHA for 10bb1af - Browse repository at this point
Copy the full SHA 10bb1afView commit details -
Add .ofNative factories to PerUnit
Allows for known `Per` object outputs instead of bounded wildcard `Measure<? extends PerUnit>`
Configuration menu - View commit details
-
Copy full SHA for 5de0ae9 - Browse repository at this point
Copy the full SHA 5de0ae9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9d2e419 - Browse repository at this point
Copy the full SHA 9d2e419View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4d4e61c - Browse repository at this point
Copy the full SHA 4d4e61cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7365901 - Browse repository at this point
Copy the full SHA 7365901View commit details
Commits on Sep 4, 2024
-
Consistently use dimension-specific measure types wherever possible
Allows for more obvious types for readability and access to type-specific methods that would otherwise be unusable (eg `Frequency.asPeriod()`) Some places must still be generic (eg trapezoid profile constraints and states)
Configuration menu - View commit details
-
Copy full SHA for 6bb4513 - Browse repository at this point
Copy the full SHA 6bb4513View commit details -
Configuration menu - View commit details
-
Copy full SHA for bcdac63 - Browse repository at this point
Copy the full SHA bcdac63View commit details
Commits on Sep 5, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 2140dec - Browse repository at this point
Copy the full SHA 2140decView commit details