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

#218 Allow differentiating between number and integer #220

Merged
merged 1 commit into from
Feb 29, 2020
Merged

Conversation

lukas-krecan
Copy link
Owner

No description provided.

@@ -98,6 +98,10 @@ public String getDescription() {

BigDecimal decimalValue();

default boolean isInteger() {
return decimalValue().scale() <= 0;
Copy link

Choose a reason for hiding this comment

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

Not sure whether scale is enough to ensure whether a given value is an integer https://stackoverflow.com/questions/1078953/check-if-bigdecimal-is-integer-value.

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.

None yet

3 participants