Code example for BigDecimal

Methods: equals

0
      return _entry;
   } 
 
   public void setEntry(BigDecimal number, int maxDecimals) {
      _maxDecimals = maxDecimals;
      if (number == null || number.equals(BigDecimal.ZERO)) {
         _entry = "";
      } else { 
         _entry = number.toPlainString();
      } 
      _listener.onEntryChanged(_entry);
   } 
 
   public BigDecimal getEntryAsBigDecimal() {
      if (_entry.length() == 0) {
         return null; 
      } 
      if (_entry.equals("0.")) {
         return BigDecimal.ZERO;
      } 
      try {