public class FileAmountMoneyUsageStatisticsStorage extends Object implements AmountMoneyUsageStatisticsStorage
| Constructor and Description |
|---|
FileAmountMoneyUsageStatisticsStorage(File file)
Creates a
FileAmountMoneyUsageStatisticsStorage and loads info
from file if it exists. |
| Modifier and Type | Method and Description |
|---|---|
int |
getUsageCount(org.jscience.economics.money.Currency currency)
Informs how often
currency has been used. |
void |
incrementUsageCount(org.jscience.economics.money.Currency currency)
Increments the usage count of
currency and stores the
information. |
void |
reset(org.jscience.economics.money.Currency currency)
Resets the stored information for
currency. |
public FileAmountMoneyUsageStatisticsStorage(File file) throws IOException
FileAmountMoneyUsageStatisticsStorage and loads info
from file if it exists.file - the file to load info fromIOException - if an IOException occurs during loading of
info from file.public int getUsageCount(org.jscience.economics.money.Currency currency)
AmountMoneyUsageStatisticsStoragecurrency has been used.getUsageCount in interface AmountMoneyUsageStatisticsStoragecurrency - the currency whose usage count to getpublic void reset(org.jscience.economics.money.Currency currency)
throws AmountMoneyUsageStatisticsStorageException
AmountMoneyUsageStatisticsStoragecurrency.reset in interface AmountMoneyUsageStatisticsStoragecurrency - the currency whose information to resetAmountMoneyUsageStatisticsStorageException - if an exception during
saving the changes occurspublic void incrementUsageCount(org.jscience.economics.money.Currency currency)
throws AmountMoneyUsageStatisticsStorageException
AmountMoneyUsageStatisticsStoragecurrency and stores the
information.incrementUsageCount in interface AmountMoneyUsageStatisticsStoragecurrency - the currency whose usage count to incrementAmountMoneyUsageStatisticsStorageException - if an exception during
saving the changes occursCopyright © 2018. All rights reserved.