Modifier and Type | Method and Description |
---|---|
Investment |
Investment.cloneMe()
Copy all attributes of
this object. |
Investment |
Portfolio.get(int index)
Determine the investment in
this portfolio with the given
index. |
Investment |
Portfolio.getFirst()
Deprecated.
As of version 4.0, replaced with
Portfolio.iterator()
Determine the first investment in this
portfolio. This method should be invoked first whenever you
intend to traverse the contents of the portfolio. If a
non-null was returned, repeated invocations of
Portfolio.getNext() will return the remaining investments in
this portfolio until a null is
returned. |
Investment |
Portfolio.getNext()
Deprecated.
As of version 4.0, replaced with
Portfolio.iterator()
Determine the next investment in this portfolio.
The method should be invoked only if Portfolio.getFirst() has
already been invoked and a non-null was returned. |
static Investment |
Investment.getRandom()
Create a random investment.
|
Investment |
Portfolio.remove(int index)
Remove the investment with the passed index from
this
portfolio. |
Modifier and Type | Method and Description |
---|---|
java.util.Iterator<Investment> |
Portfolio.iterator()
Determine an Iterator over the Investment objects in
this
portfolio. |
Modifier and Type | Method and Description |
---|---|
boolean |
Portfolio.add(Investment inv)
Attempt to add the passed investment to
this portfolio. |
Constructor and Description |
---|
Investment(Investment investment)
Construct a (shallow) copy of the passed Investment.
|