Age | Commit message (Collapse) | Author |
|
I used the Git history for years after 2019, and only included 2019 or
2018 if they were already there. I also added copyright notices to all
code files that don't already have them.
|
|
In some cases I've used @SuppressWarnings, which Gradle doesn't seem to
respect, but I've solved all the other ones.
|
|
Previously, these classes' equals() and hashCode() methods did not obey
the contracts:
For equals(), I considered two values equal even if there was a very
small deviation, in order to avoid floating-point error. This equals
relation is not transitive (i.e. it is possible that a = b && b = c but
a ≠ c), violating the contract of equals.
This also makes it impossible to properly implement hashCode, as if two
values are equal, they must have the same hash code. The solution I had
provided is an ineffective hack, which could mess with hash maps and
sets.
I have changed the implementation to demand exact equality. I have also
provided equalsApproximately() methods to both classes that use the old
behaviour. Hash codes are only really used for hash maps, and the old
implementation doesn't even achieve its purpose, so I did not add a
method to return the old hash behaviour.
|
|
|
|
This was added to be consistent with the data file spec, which was
changed for consistency with unit expressions. It may not be a common
expression, but it's a bit weird that you can use +/- in units but not
prefixes, even though they're in the same file!
|
|
(Added tests for the settings and unit/prefix viewer parts of the GUI, which are
not yet implemented)
|
|
TabbedView now displays its units, but with their toString method which shows
their definition in addition to their name
|
|
|
|
|