Skip to content

Commit

Permalink
Add math utility method
Browse files Browse the repository at this point in the history
  • Loading branch information
Matteo Giordano committed Feb 7, 2019
1 parent 8d09e54 commit 205650e
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,16 @@ public static boolean isNotZero( BigDecimal number )
return ! isZero( number );
}

public static boolean allZeroes( BigDecimal... numbers )
{
for ( BigDecimal number : numbers )
{
if ( isNotZero( number ) ) return false;
}

return true;
}

public static BigDecimal parseFloat( Float amount )
{
return BigDecimal.valueOf( amount )
Expand Down

0 comments on commit 205650e

Please sign in to comment.