Package com.google.gdata.data.extensions

Examples of com.google.gdata.data.extensions.Money


    System.out.printf("\t\t\tOverall: %.2f%%\n", portfolioData.getReturnOverall() * 100.0);
    if (portfolioData.getCostBasis() == null) {
      System.out.println("\t\tCost Basis not specified");
    } else {
      for (int i = 0; i < portfolioData.getCostBasis().getMoney().size(); i++) {
        Money m = portfolioData.getCostBasis().getMoney().get(i);
        System.out.printf("\t\tThis portfolio cost %.2f %s.\n",
                          m.getAmount(), m.getCurrencyCode());
      }
    }
    if (portfolioData.getDaysGain() == null) {
      System.out.println("\t\tDay's Gain not specified");
    } else {
      for (int i = 0; i < portfolioData.getDaysGain().getMoney().size(); i++) {
        Money m = portfolioData.getDaysGain().getMoney().get(i);
        System.out.printf("\t\tThis portfolio made %.2f %s today.\n",
                          m.getAmount(), m.getCurrencyCode());
      }
    }
    if (portfolioData.getGain() == null) {
      System.out.println("\t\tTotal Gain not specified");
    } else {
      for (int i = 0; i < portfolioData.getGain().getMoney().size(); i++) {
        Money m = portfolioData.getGain().getMoney().get(i);
        System.out.printf("\t\tThis portfolio has a total gain of %.2f %s.\n",
                          m.getAmount(), m.getCurrencyCode());
      }
    }
    if (portfolioData.getMarketValue() == null) {
      System.out.println("\t\tMarket Value not specified");
    } else {
      for (int i = 0; i < portfolioData.getMarketValue().getMoney().size(); i++) {
        Money m = portfolioData.getMarketValue().getMoney().get(i);
        System.out.printf("\t\tThis portfolio is worth %.2f %s.\n",
                          m.getAmount(), m.getCurrencyCode());
      }
    }
  }
View Full Code Here


    System.out.printf("\t\t\tOverall: %.2f%%\n", positionData.getReturnOverall() * 100.0);
    if (positionData.getCostBasis() == null) {
      System.out.println("\t\tCost Basis not specified");
    } else {
      for (int i = 0; i < positionData.getCostBasis().getMoney().size(); i++) {
        Money m = positionData.getCostBasis().getMoney().get(i);
        System.out.printf("\t\tThis position cost %.2f %s.\n",
                          m.getAmount(), m.getCurrencyCode());
      }
    }
    if (positionData.getDaysGain() == null) {
      System.out.println("\t\tDay's Gain not specified");
    } else {
      for (int i = 0; i < positionData.getDaysGain().getMoney().size(); i++) {
        Money m = positionData.getDaysGain().getMoney().get(i);
        System.out.printf("\t\tThis position made %.2f %s today.\n",
                          m.getAmount(), m.getCurrencyCode());
      }
    }
    if (positionData.getGain() == null) {
      System.out.println("\t\tTotal Gain not specified");
    } else {
      for (int i = 0; i < positionData.getGain().getMoney().size(); i++) {
        Money m = positionData.getGain().getMoney().get(i);
        System.out.printf("\t\tThis position has a total gain of %.2f %s.\n",
                          m.getAmount(), m.getCurrencyCode());
      }
    }
    if (positionData.getMarketValue() == null) {
      System.out.println("\t\tMarket Value not specified");
    } else {
      for (int i = 0; i < positionData.getMarketValue().getMoney().size(); i++) {
        Money m = positionData.getMarketValue().getMoney().get(i);
        System.out.printf("\t\tThis position is worth %.2f %s.\n",
                          m.getAmount(), m.getCurrencyCode());
      }
    }
  }
View Full Code Here

    System.out.printf("\t\tShares: %.2f\n", transactionData.getShares());
    if (transactionData.getPrice() == null) {
      System.out.println("\t\tPrice not specified");
    } else {
      for (int i = 0; i < transactionData.getPrice().getMoney().size(); i++) {
        Money m = transactionData.getPrice().getMoney().get(i);
        System.out.printf("\t\tThis transaction had a unit price of %.2f %s.\n",
                          m.getAmount(), m.getCurrencyCode());
      }
    }
    if (transactionData.getCommission() == null) {
      System.out.println("\t\tCommission not specified");
    } else {
      for (int i = 0; i < transactionData.getCommission().getMoney().size(); i++) {
        Money m = transactionData.getCommission().getMoney().get(i);
        System.out.printf("\t\tThis transaction had a commission of %.2f %s.\n",
                          m.getAmount(), m.getCurrencyCode());
      }
    }
    System.out.println("\t\tNotes: " +
                       (null == transactionData.getNotes() ? "none" : transactionData.getNotes()));
  }
View Full Code Here

TOP

Related Classes of com.google.gdata.data.extensions.Money

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.