示例#1
0
 private PortfolioEvents() throws ParserConfigurationException {
   this.events = new Object[10][7];
   this.size = 1;
   events[0] =
       new Object[] {
         InvestDate.today(),
         InvestDate.currentTime(),
         "initiate portfolio",
         String.format("%.02f", liquidAsset),
         String.format("%.02f", liquidAsset),
         String.format("%.02f", liquidAsset),
         "0.00"
       };
 }
示例#2
0
 private void addEvent(String message, Object change, Object changeValue)
     throws ParserConfigurationException {
   if (size >= events.length) {
     events = Arrays.copyOf(events, events.length * 2);
   }
   events[size++] =
       new Object[] {
         InvestDate.today(),
         InvestDate.currentTime(),
         message,
         change instanceof Double ? String.format("%.02f", change) : change,
         changeValue instanceof Double ? String.format("%.02f", changeValue) : changeValue,
         String.format("%.02f", getLiquidAsset()),
         String.format("%.02f", invest.getValueSum())
       };
 }