Interface MutableTransaction

All Superinterfaces:
Transaction

public interface MutableTransaction extends 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 Type
    Method
    Description
    long
    addToBalance(long amount)
    Adds a number to the balance transferred in this transaction
    long
    removeFromBalance(long amount)
    Subtracts a number from the balance transferred in this transaction
    void
    setBalance(long newBalance)
    Sets the balance transferred in this transaction

    Methods 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