Skip to content

Commit

Permalink
Modify setBalance to return updated balance
Browse files Browse the repository at this point in the history
Changed the return type of the setBalance method in the Account class from void to BigDecimal. This update allows the method to return the updated balance after setting it.
  • Loading branch information
NonSwag committed Sep 2, 2024
1 parent a8507be commit cba9999
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/src/main/java/net/thenextlvl/economist/api/Account.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ default int compareTo(Account account) {
* Sets the balance of the account to the specified value.
*
* @param balance the new balance of the account
* @return the updated balance of the account
*/
void setBalance(Number balance);
BigDecimal setBalance(Number balance);
}

0 comments on commit cba9999

Please sign in to comment.