|
|||||||||
| Home >> All >> org >> mandarax >> eca >> [ example overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.mandarax.eca.example
Class Portfolio

java.lang.Objectorg.mandarax.eca.example.Portfolio
- public class Portfolio
- extends java.lang.Object
Class representing a portfolio of investments (e.g., shares).
| Field Summary | |
private java.util.List |
investments
|
| Constructor Summary | |
Portfolio()
Constructor. |
|
| Method Summary | |
void |
add(Investment inv)
Add an investment. |
java.util.List |
getInvestments()
Get a list of all investments. |
double |
getRelativeValue(Investment inv)
Get the relative value of a portfolio in an investment. |
double |
getTotalValue()
Get the total value of all investments. |
void |
remove(Investment inv)
Remove an investment. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
investments
private java.util.List investments
| Constructor Detail |
Portfolio
public Portfolio()
- Constructor.
| Method Detail |
add
public void add(Investment inv)
- Add an investment.
remove
public void remove(Investment inv)
- Remove an investment.
getTotalValue
public double getTotalValue()
- Get the total value of all investments.
getRelativeValue
public double getRelativeValue(Investment inv)
- Get the relative value of a portfolio in an investment.
getInvestments
public java.util.List getInvestments()
- Get a list of all investments.
|
|||||||||
| Home >> All >> org >> mandarax >> eca >> [ example overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.mandarax.eca.example.Portfolio