code: public BigDecimal getTotal() {
  
      if (total == null) {
        return available.add(frozen).subtract(borrowed).add(loaned).add(withdrawing).add(depositing);
      } else {
        return total;
      }
    }
docs: Returns the total amount of the <code>currency</code> in this balance.
  
  @return the total amount.