public class PRPortfolio extends Portfolio implements objects.ConfigurableObject, Serializable
| Modifier and Type | Field and Description |
|---|---|
protected int |
MAX_NUM_OF_POSITIONS |
protected String |
myVersion |
protected String |
name |
protected int |
NUM_OF_SECURITIES |
protected int |
NUM_OF_TYPES |
protected Map |
positions |
protected static Random |
rng |
String |
undefinedTestField |
| Constructor and Description |
|---|
PRPortfolio() |
PRPortfolio(String name,
int id)
Constructor to randomly populate the portfolio.
|
| Modifier and Type | Method and Description |
|---|---|
Map |
createPdxHelperMap()
Create a map of fields and field values to use to write to the blackboard
since PdxSerialiables cannot be put on the blackboard since the MasterController
does not have pdx objects on its classpath.
|
boolean |
equals(Object anObj)
To enable the comparison.
|
int |
getId() |
int |
getIndex()
Returns the index encoded in the object.
|
String |
getName() |
Map |
getPositions() |
protected Properties |
getProps()
To provide random values to populate a position.
|
String |
getStatus() |
String |
getType()
Getter for property type.
|
int |
hashCode() |
void |
init(int i)
Returns a new instance of the object encoded with the index.
|
void |
restoreFromPdxHelperMap(Map aMap)
Restore the fields of this instance using the values of the Map, created
by createPdxHelperMap()
|
void |
setId(int id) |
void |
setName(String name) |
void |
setStatus(String status) |
void |
setType(String type) |
void |
validate(int index)
Validates whether the index is encoded in the object, if this
applies, and performs other validation checks as needed.
|
getID, isActive, testMethod, toStringprotected String myVersion
protected static final Random rng
protected int NUM_OF_TYPES
protected int MAX_NUM_OF_POSITIONS
protected int NUM_OF_SECURITIES
protected String name
protected Map positions
public String undefinedTestField
public PRPortfolio()
public PRPortfolio(String name, int id)
name - id - public int getId()
public String getName()
public String getStatus()
public void setId(int id)
public void setName(String name)
public void setStatus(String status)
public void setType(String type)
public void init(int i)
Portfoliopublic void validate(int index)
Portfoliopublic int getIndex()
Portfoliopublic Map getPositions()
protected Properties getProps()
public boolean equals(Object anObj)
public Map createPdxHelperMap()
createPdxHelperMap in class Portfoliopublic void restoreFromPdxHelperMap(Map aMap)
restoreFromPdxHelperMap in class PortfolioCopyright © 2010-2015 Pivotal Software, Inc. All rights reserved.