JavaMoney / jsr354-ri

JSR 354 - Moneta: Reference Implementation
Other
344 stars 101 forks source link

small fixes #259

Closed stokito closed 5 years ago

stokito commented 5 years ago

Here is small changes with cleanup and small fixes. But I have an additional question: In the 1ca1602 commit I changed body of the RoundedMoney.isZero() so now it looks exactly the same as in javax.money.MonetaryAmount#isZero. In the MonetaryAmount are declared such methods:

    public boolean isZero() {
        return signum() == 0;
    }

    public boolean isPositive() {
        return signum() == 1;
    }

    public boolean isPositiveOrZero() {
        return signum() >= 0;
    }

    public boolean isNegative() {
        return signum() == -1;
    }

    public boolean isNegativeOrZero() {
        return signum() <= 0;
    }

And all of them with exactly the same body are declared in Money and RoundingMoney. So maybe we can just remove the isZero, isPositive etc methods from the Money and RoundingMoney?


This change is Reviewable