data.ooimpl
Class MoneyBagImpl
java.lang.Object
data.AbstractNameable
data.ooimpl.StockItemImpl
data.ooimpl.StockImpl
data.ooimpl.CountingStockImpl
data.ooimpl.MoneyBagImpl
- All Implemented Interfaces:
- Cloneable, Comparable, CountingStock, DataBasketEntryDestination, DataBasketEntrySource, DataBasketKeys, ListenableStock, MoneyBag, Nameable, NameContext, SelfManagingDBEDestination, SelfManagingDBESource, Serializable, Stock, StockItem
- public class MoneyBagImpl
- extends CountingStockImpl
- implements MoneyBag
Pure Java implementation of the MoneyBag
interface.
- Since:
- v2.0
- Author:
- Steffen Zschaler
- See Also:
- Serialized Form
Methods inherited from class data.ooimpl.CountingStockImpl |
add, add, addStock, commitAdd, commitRemove, contains, containsStock, countItems, createPeer, get, internalSetCatalog, remove, remove, remove, rollbackAdd, rollbackRemove |
Methods inherited from class data.ooimpl.StockImpl |
addStockChangeListener, checkNameChange, clone, compareTo, contains, fillShallowClone, fillStockWithValue, fireCanEditStockItems, fireCanRemoveStockItems, fireEditingStockItems, fireStockItemsAddCommit, fireStockItemsAdded, fireStockItemsAddRollback, fireStockItemsEditCommit, fireStockItemsEditRollback, fireStockItemsRemoveCommit, fireStockItemsRemoved, fireStockItemsRemoveRollback, getCatalog, getEditingItemsContainer, getItemsContainer, getItemsLock, getNCMonitor, getRefIntegrEditContainer, getRefIntegrItemsContainer, getShallowClone, getTemporaryAddedItemsContainer, getTemporaryRemovedItemsContainer, iterator, keySet, nameHasChanged, prepareReferentialIntegrity, removeStockChangeListener, setEditingItemsContainer, setItemsContainer, setRefIntegrEditContainer, setRefIntegrItemsContainer, setStock, setTemporaryAddedItemsContainer, setTemporaryRemovedItemsContainer, size, sumStock |
Methods inherited from interface data.Stock |
add, addStock, contains, contains, containsStock, countItems, fillStockWithValue, get, getCatalog, iterator, keySet, remove, remove, size, sumStock |
MoneyBagImpl
public MoneyBagImpl(String sName,
CurrencyImpl ci)
- Deprecated. As of version 3.0, replaced by MoneyBagImpl (String sName, AbstractCurrency ac).
- Create a new MoneyBagImpl.
- Parameters:
sName
- the name of the MoneyBag.ci
- the Currency associated to the MoneyBag.
MoneyBagImpl
public MoneyBagImpl(String sName,
AbstractCurrency ac)
- Create a new MoneyBagImpl.
- Parameters:
sName
- the name of the MoneyBag.ac
- the Currency associated to the MoneyBag.
transferMoney
public void transferMoney(MoneyBag mbDest,
DataBasket db,
NumberValue nvAmount)
- Tries to transfer money from this DataBasket into another one.
- Specified by:
transferMoney
in interface MoneyBag
- Parameters:
mbDest
- the MoneyBag to transfer the money todb
- a transaction DataBasketnvAmount
- the amount of money to transfer
toString
public String toString()
- Return a String representation of the MoneyBag.
In addition to the representation created by the super class this will calculate the total amount of
this MoneyBag and append this in formatted form to the end of the representation.
- Overrides:
toString
in class CountingStockImpl
- Override:
- Sometimes