Skip to content

wilsoncampusano/bigdecimal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

BigDecimal comparison util.

Look this

	//some imports ...

	//some code...
    BigDecimal balance = account.getBalance();

    if(balance != null && balance.compareTo(BigDecimal.Zero) == 0){
    	//.. do something
    }

It's not clean code :tear: ...

Apply ComparableBigDecimal.... and now look this! 👍

	//some imports ...
    import static BigDecimalUtil.*;
	import static ComparableBigDecimal;

	//some code...
    BigDecimal balance = account.getBalance();

    if(value(balance, isZeroOrNull()){
    	//.. do something
    }

Todos

  • Zero or null
  • Igual to
  • Greater than
  • Less than

About

BigDecimal Util library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages