|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectceleboss.data.ShareBlock
celeboss.data.PurchasedShares
This class represents a block of shares assigned to a Celebrity
| Field Summary | |
static java.lang.String |
COST
Property name for cost of Shares |
static java.lang.String |
PROFIT
Property name for current profit |
static java.lang.String |
WORTH
Property name for worth of Shares |
| Fields inherited from class celeboss.data.ShareBlock |
CELEBRITY, NUMBEROFSHARES, PREDICTEDDIV, PREDICTEDVALUE, PURCHASED |
| Constructor Summary | |
|
PurchasedShares(Portfolio parent,
Celebrity celeb,
int number,
java.lang.Float origPrice)
Create a new block of shares in a specific celebrity |
protected |
PurchasedShares(PurchasedShares element)
Create a clone copy of the specified object |
| Method Summary | |
protected void |
calculateWorthProfit()
Calculate the profit and value based on number of share and current share price |
java.lang.Float |
getCost()
Return the cost of purchase |
java.lang.Float |
getProfit()
Return the profit |
java.lang.Float |
getWorth()
Return the current value of shares |
void |
init()
THis method is called to initialise the entity once the complete and has either been accepted by the Portfolio or when the Celebrity model has been loaded. |
void |
propertyChange(java.beans.PropertyChangeEvent arg0)
Change has occured |
| Methods inherited from class celeboss.data.ShareBlock |
addPropertyChangeListener, calculatePredictedDividend, calculatePredictedValue, firePropertyChange, getCelebrity, getNumberOfShares, getOwner, getPredictedDividend, getPredictedValue, getPurchased, release, removePropertyChangeListener, setNumberOfShares, setPurchased, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String COST
public static final java.lang.String WORTH
public static final java.lang.String PROFIT
| Constructor Detail |
public PurchasedShares(Portfolio parent,
Celebrity celeb,
int number,
java.lang.Float origPrice)
parent - Parent portfolio.celeb - Celebrity of sharesnumber - Number of sharesorigPrice - Original purchase costprotected PurchasedShares(PurchasedShares element)
element - Source for copy.| Method Detail |
protected void calculateWorthProfit()
public java.lang.Float getCost()
public java.lang.Float getProfit()
public java.lang.Float getWorth()
public void init()
init in class ShareBlockpublic void propertyChange(java.beans.PropertyChangeEvent arg0)
propertyChange in interface java.beans.PropertyChangeListenerpropertyChange in class ShareBlockarg0 - Event describing change.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||