mirror of
https://github.com/SimplexDevelopment/FreedomNetworkSuite.git
synced 2024-11-14 05:03:33 +00:00
Refactor transaction balance methods to be more in-line with EconomicEntityData
This commit is contained in:
parent
a598434bf9
commit
cb208c710f
@ -43,15 +43,15 @@ public class SimpleTransaction implements Transaction
|
||||
}
|
||||
|
||||
@Override
|
||||
public long addBalance(long amount)
|
||||
public long addToBalance(long amount)
|
||||
{
|
||||
return balance.addAndGet(amount);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long removeBalance(long amount)
|
||||
public long removeFromBalance(long amount)
|
||||
{
|
||||
return this.addBalance(-amount);
|
||||
return this.addToBalance(-amount);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -10,9 +10,9 @@ public interface Transaction
|
||||
|
||||
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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user