Package me.totalfreedom.economy
Interface MutableTransaction
- All Superinterfaces:
Transaction
A transaction that can be changed.
IMPORTANT NOTE: Please ensure that all modifications of MutableTransaction happen BEFORE it is passed to a
Transactor implementation
-
Method Summary
Modifier and TypeMethodDescriptionlongaddToBalance(long amount) Adds a number to the balance transferred in this transactionlongremoveFromBalance(long amount) Subtracts a number from the balance transferred in this transactionvoidsetBalance(long newBalance) Sets the balance transferred in this transactionMethods inherited from interface me.totalfreedom.economy.Transaction
getBalance, getDestination, getSource
-
Method Details
-
addToBalance
long addToBalance(long amount) Adds a number to the balance transferred in this transaction- Parameters:
amount- the amount to add- Returns:
- the new amount
-
removeFromBalance
long removeFromBalance(long amount) Subtracts a number from the balance transferred in this transaction- Parameters:
amount- the amount to remove- Returns:
- the new amount
-
setBalance
void setBalance(long newBalance) Sets the balance transferred in this transaction- Parameters:
newBalance- the new balance of the transaction
-