mirror of
https://github.com/SimplexDevelopment/FreedomNetworkSuite.git
synced 2024-11-22 16:55:01 +00:00
Refactor arithmetic operations in EconomicEntityData to be more in-line with Transaction
This commit is contained in:
parent
cb208c710f
commit
7817b0770c
@ -220,15 +220,15 @@ public class SimpleUserData implements UserData
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addToBalance(long amount)
|
public long addToBalance(long amount)
|
||||||
{
|
{
|
||||||
balance.addAndGet(amount);
|
return balance.addAndGet(amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void removeFromBalance(long amount)
|
public long removeFromBalance(long amount)
|
||||||
{
|
{
|
||||||
balance.addAndGet(-amount);
|
return balance.addAndGet(-amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -6,9 +6,9 @@ public interface EconomicEntityData
|
|||||||
|
|
||||||
long getBalance();
|
long getBalance();
|
||||||
|
|
||||||
void addToBalance(final long amount);
|
long addToBalance(final long amount);
|
||||||
|
|
||||||
void removeFromBalance(final long amount);
|
long removeFromBalance(final long amount);
|
||||||
|
|
||||||
void setBalance(final long newBalance);
|
void setBalance(final long newBalance);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user