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 inc/dec on Counter #14

Merged
merged 1 commit into from
Aug 6, 2013
Merged

Conversation

alexy
Copy link
Contributor

@alexy alexy commented Aug 6, 2013

In Java, there are versions without a parameter and with one, here I add inc/dec with the default parameter of 1. They can also call +=/-+ instead.

@erikvanoosten
Copy link
Owner

@alexy what is the motive for having inc and dec? Java interoperability, similarity to java API, or perhaps something else?

erikvanoosten added a commit that referenced this pull request Aug 6, 2013
add inc/dec on Counter
@erikvanoosten erikvanoosten merged commit 054318d into erikvanoosten:master Aug 6, 2013
@alexy
Copy link
Contributor Author

alexy commented Aug 8, 2013

Thanks! The motive was that Java version has it and metrics-scala 3.0.0 called through it, apparently, so inc/dec worked and were in a working project. It is often clearer to jsut inc/dec a counter, e.g. for a queue, instead of always supplying 1.

@erikvanoosten
Copy link
Owner

Forgot to add this change to the release notes. Updated...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants