Skip to content
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

Add getAsRatio to Settings class, allow DiskThresholdDecider to take percentages #5690

Closed
wants to merge 2 commits into from

Conversation

dakrone
Copy link
Member

@dakrone dakrone commented Apr 4, 2014

Adds new RatioValue class that parses ratios between 0-100% expressed in
either floating-point (0.13) or percentage (51.12%) notation.

…e percentages

Adds new RatioValue class that parses ratios between 0-100% expressed in
either floating-point (0.13) or percentage (51.12%) notation.
/**
* Parses the provided string as a {@link RatioValue}, the string can
* either be in percentage format (eg. 73.5%), or a floating-point ratio
* format (eg. 0.112)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd be ever so slightly clearer if the two examples parsed to the same RaioValue. Like (eg. 73.5%) and (eg. .735).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point, I'll update this javadoc for that.

@kimchy
Copy link
Member

kimchy commented Apr 4, 2014

LGTM

@dakrone dakrone closed this in 211f740 Apr 4, 2014
dakrone added a commit that referenced this pull request Apr 4, 2014
…e percentages

Adds new RatioValue class that parses ratios between 0-100% expressed in
either floating-point (0.13) or percentage (51.12%) notation.

Closes #5690
@dakrone dakrone deleted the disk-decider-parse-ratios branch April 21, 2014 23:00
@clintongormley clintongormley added the :Core/Infra/Settings Settings infrastructure and APIs label Jun 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants