Refactor transaction balance methods to be more in-line with EconomicEntityData

This commit is contained in:
Allink 2023-05-20 06:08:17 +01:00
parent a598434bf9
commit cb208c710f
No known key found for this signature in database
2 changed files with 5 additions and 5 deletions

View File

@ -43,15 +43,15 @@ public class SimpleTransaction implements Transaction
} }
@Override @Override
public long addBalance(long amount) public long addToBalance(long amount)
{ {
return balance.addAndGet(amount); return balance.addAndGet(amount);
} }
@Override @Override
public long removeBalance(long amount) public long removeFromBalance(long amount)
{ {
return this.addBalance(-amount); return this.addToBalance(-amount);
} }
@Override @Override

View File

@ -10,9 +10,9 @@ public interface Transaction
long getBalance(); long getBalance();
long addBalance(final long amount); long addToBalance(final long amount);
long removeBalance(final long amount); long removeFromBalance(final long amount);
void setBalance(final long newBalance); void setBalance(final long newBalance);
} }