-
Notifications
You must be signed in to change notification settings - Fork 77
Lazy Statistics #1656
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
base: master
Are you sure you want to change the base?
Lazy Statistics #1656
Conversation
|
|
||
| @JvmInline | ||
| internal value class StatisticResult(val value: Any?) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ParameterValue class was created so that it could override equals and hashCode. In this way it is possible to correctly compare two Map<String, ParameterValue>.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you comment, please leave a comment at exactly the relevant line :) Looking at the comment, I thought it belonged to StatisticResult
| @JvmInline | ||
| internal value class StatisticResult(val value: Any?) | ||
|
|
||
| public class ParameterValue(public val parameter: Any?) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this necessary? booleans, doubles and integers are primitives. They already have a consistent hashcode and correctly working equals
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand, that class was actually useless. Fixed with the new commit. I choose for a non-nullable Any beacuse each time an entry is created the actual parameter is non-nullable.

Fixed version of #1636