jfreerails.world.accounts
Class AddItemTransaction
java.lang.Object
jfreerails.world.accounts.AddItemTransaction
- All Implemented Interfaces:
- java.io.Serializable, Transaction, FreerailsSerializable
- Direct Known Subclasses:
- BondTransaction, StockTransaction
public class AddItemTransaction
- extends java.lang.Object
- implements Transaction
This Transaction represents the charge/credit for buying/selling an item.
- Author:
- Luke Lindsay
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
amount
private final Money amount
category
private final Transaction.Category category
- For example track.
quantity
private final int quantity
- For example, 4 tiles.
type
private final int type
- For example, standard track.
AddItemTransaction
public AddItemTransaction(Transaction.Category category,
int type,
int quantity,
Money amount)
deltaAssets
public Money deltaAssets()
- Specified by:
deltaAssets in interface Transaction
deltaCash
public Money deltaCash()
- Description copied from interface:
Transaction
- Positive means credit.
- Specified by:
deltaCash in interface Transaction
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals in class java.lang.Object
getCategory
public Transaction.Category getCategory()
- Specified by:
getCategory in interface Transaction
getQuantity
public int getQuantity()
getType
public int getType()
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object