public class TransactionEvent
extends java.lang.Object
Constructor and Description |
---|
TransactionEvent(java.lang.String fromAccountName,
java.lang.String toAccountName)
Convenience constructor.
|
TransactionEvent(java.lang.String fromAccountName,
java.lang.String toAccountName,
java.lang.String itemID,
int quantity) |
Modifier and Type | Method and Description |
---|---|
void |
addFromLineItem(TransactionLineItem line)
This method adds something to the line item list of the account being charged (the "from account").
|
void |
addLineItem(TransactionLineItem line)
Adds a line item to the transaction in BOTH the to and from line item lists.
|
void |
addToLineItem(TransactionLineItem line)
This method adds something to the line item list of the account being credited (the "to account").
|
java.lang.String |
getFromAccountName() |
int |
getFromAmount() |
java.util.Vector<TransactionLineItem> |
getFromLineItems() |
java.lang.String |
getItemID() |
int |
getQuantity() |
java.lang.String |
getToAccountName() |
int |
getToAmount() |
java.util.Vector<TransactionLineItem> |
getToLineItems() |
void |
removeFromLineItem(TransactionLineItem line) |
void |
removeLineItem(TransactionLineItem line) |
void |
removeToLineItem(TransactionLineItem line) |
void |
setFromLineItems(java.util.Vector<TransactionLineItem> fromLineItems) |
void |
setToLineItems(java.util.Vector<TransactionLineItem> toLineItems) |
public TransactionEvent(java.lang.String fromAccountName, java.lang.String toAccountName)
fromAccountName
- Name of the account being chargedtoAccountName
- Name of the account being creditedpublic TransactionEvent(java.lang.String fromAccountName, java.lang.String toAccountName, java.lang.String itemID, int quantity)
fromAccountName
- Name of the account being chargedtoAccountName
- Name of the account being crediteditemID
- ID of the item being sold. It is assumed that the item is going TO the player represented by the fromAccountquantity
- how many of the item is being soldpublic java.lang.String getFromAccountName()
public int getFromAmount()
public java.lang.String getToAccountName()
public int getToAmount()
public java.lang.String getItemID()
public int getQuantity()
public void addLineItem(TransactionLineItem line)
line
- public void removeLineItem(TransactionLineItem line)
public void addToLineItem(TransactionLineItem line)
line
- public void removeToLineItem(TransactionLineItem line)
public void addFromLineItem(TransactionLineItem line)
line
- public void removeFromLineItem(TransactionLineItem line)
public java.util.Vector<TransactionLineItem> getToLineItems()
public void setToLineItems(java.util.Vector<TransactionLineItem> toLineItems)
public java.util.Vector<TransactionLineItem> getFromLineItems()
public void setFromLineItems(java.util.Vector<TransactionLineItem> fromLineItems)