public Balance getBalance(Currency currency) {

    Balance balance = this.balances.get(currency);
    return balance == null ? Balance.zero(currency) : balance;
  }
public Balance getBalance ( Currency currency ) { Balance balance = this . balances . get ( currency ) ; return balance == null ? Balance . zero ( currency ) : balance ; }
Returns the balance for the specified currency.

@param currency a {@link Currency}.
@return the balance of the specified currency, or a zero balance if currency not present