mirror of
https://github.com/SimplexDevelopment/FreedomNetworkSuite.git
synced 2024-06-02 11:21:45 +00:00
42 lines
889 B
Java
42 lines
889 B
Java
package me.totalfreedom.economy;
|
|
|
|
/**
|
|
* Metadata associated with a {@link EconomicEntity}
|
|
*/
|
|
public interface EconomicEntityData
|
|
{
|
|
/***
|
|
* @return the transaction freeze state
|
|
*/
|
|
boolean areTransactionsFrozen();
|
|
|
|
/***
|
|
* @return the balance
|
|
*/
|
|
long getBalance();
|
|
|
|
|
|
/**
|
|
* Adds the provided amount to the associated instance's balance
|
|
*
|
|
* @param amount the amount to add
|
|
* @return the new balance
|
|
*/
|
|
long addToBalance(final long amount);
|
|
|
|
/**
|
|
* Subtracts the provided amount from the associated instance's balance
|
|
*
|
|
* @param amount the amount to subtract
|
|
* @return the new balance
|
|
*/
|
|
long removeFromBalance(final long amount);
|
|
|
|
/**
|
|
* Sets the balance of the associated instance
|
|
*
|
|
* @param newBalance the new balance
|
|
*/
|
|
void setBalance(final long newBalance);
|
|
}
|