예제 #1
0
      private Integer getSumOwed() {
        Integer sumOwed = 0;
        for (Balance creditor : self.creditors()) {
          sumOwed += creditor.getBalance() < 0 ? -creditor.getBalance() : 0;
        }

        return sumOwed;
      }
예제 #2
0
 public List<Balance> getCreditors() {
   return self.creditors().toList();
 }
예제 #3
0
 public Balance getAccount(String accountId) {
   return self.getAccount(accountId);
 }