getTotalFieldForUser(users[i]).setValue(new Double(bill == null ? 0 : bill.getTotalFor(users[i])));
if (users[i].getName().equals("Shared")) { double cost = bill == null ? 0 : bill.getTotalFor(users[i]); getTotalFieldForUser(users[i]).setValue(new Double(cost * _taxRate)); } else { double cost = bill == null ? sharedPerPerson : sharedPerPerson + bill.getTotalFor(users[i]); getTotalFieldForUser(users[i]).setValue(new Double(cost * _taxRate)); }
  private void updateTotals(final BillModel model) {    final Bill bill = model.getBill();    final Person[] users = _application.getPersonsModel().getUsers();    for (int i = 0; i < users.length; i++) {      getTotalFieldForUser(users[i]).setValue(new Double(bill == null ? 0 : bill.getTotalFor(users[i])));    }  }