Advertisement
Chiddix

company bean

Apr 21st, 2013
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 3.75 KB | None | 0 0
  1. package org.stock.util;
  2.  
  3. /**
  4.  * Represents a company.
  5.  * @author Ryan Greene
  6.  *
  7.  */
  8. public class Company {
  9.  
  10.     /**
  11.      * The symbol or ticker.
  12.      */
  13.     private final String symbol;
  14.    
  15.     /**
  16.      * The name.
  17.      */
  18.     private final String name;
  19.    
  20.     /**
  21.      * The last sale.
  22.      */
  23.     private final double lastSale;
  24.    
  25.     /**
  26.      * The market capacity.
  27.      */
  28.     private final double marketCap;
  29.    
  30.     /**
  31.      * The applied data research time sharing option.
  32.      */
  33.     private final String adrTso;
  34.    
  35.     /**
  36.      * The initial public offering year.
  37.      */
  38.     private final int ipoYear;
  39.    
  40.     /**
  41.      * The sector.
  42.      */
  43.     private final String sector;
  44.    
  45.     /**
  46.      * The industry.
  47.      */
  48.     private final String industry;
  49.    
  50.     /**
  51.      * The summary quote.
  52.      */
  53.     private final String summaryQuote;
  54.    
  55.     /**
  56.      * Creates a new company with the specified details.
  57.      * @param symbol The symbol or ticker.
  58.      * @param name The name.
  59.      * @param lastSale The last sale.
  60.      * @param marketCap The market cap.
  61.      * @param The applied data research time sharing option.
  62.      * @param ipoYear The initial public offering year.
  63.      * @param sector The symbol.
  64.      * @param industry The industry.
  65.      * @param summaryQuote The summary quote.
  66.      * @return The created company.
  67.      */
  68.     public static Company createCompany(String symbol, String name, double lastSale, double marketCap, String adrTso, int ipoYear,
  69.             String sector, String industry, String summaryQuote) {
  70.         return new Company(symbol, name, lastSale, marketCap, adrTso, ipoYear, sector, industry, summaryQuote);
  71.     }
  72.    
  73.     /**
  74.      * Constructs a new company.
  75.      * @param symbol The symbol or ticker.
  76.      * @param name The name.
  77.      * @param lastSale The last sale.
  78.      * @param marketCap The market cap.
  79.      * @param The applied data research time sharing option.
  80.      * @param ipoYear The initial public offering year.
  81.      * @param sector The symbol.
  82.      * @param industry The industry.
  83.      * @param summaryQuote The summary quote.
  84.      */
  85.     private Company(String symbol, String name, double lastSale, double marketCap, String adrTso, int ipoYear,
  86.             String sector, String industry, String summaryQuote) {
  87.         this.symbol = symbol;
  88.         this.name = name;
  89.         this.lastSale = lastSale;
  90.         this.marketCap = marketCap;
  91.         this.adrTso = adrTso;
  92.         this.ipoYear = ipoYear;
  93.         this.sector = sector;
  94.         this.industry = industry;
  95.         this.summaryQuote = summaryQuote;
  96.     }
  97.  
  98.     /**
  99.      * Gets the symbol of the company.
  100.      * @return The symbol of the company.
  101.      */
  102.     public String getSymbol() {
  103.         return symbol;
  104.     }
  105.  
  106.     /**
  107.      * Gets the name of the company.
  108.      * @return The name of the company.
  109.      */
  110.     public String getName() {
  111.         return name;
  112.     }
  113.  
  114.     /**
  115.      * Gets the last sale of the company.
  116.      * @return The last sale of the company.
  117.      */
  118.     public double getLastSale() {
  119.         return lastSale;
  120.     }
  121.  
  122.     /**
  123.      * Gets the market capacity of the company.
  124.      * @return The market capacity of the company.
  125.      */
  126.     public double getMarketCap() {
  127.         return marketCap;
  128.     }
  129.  
  130.     /**
  131.      * Gets the applied data research time sharing option of the company.
  132.      * @return The applied data research time sharing option of the company.
  133.      */
  134.     public String getAdrTso() {
  135.         return adrTso;
  136.     }
  137.  
  138.     /**
  139.      * Gets the initial public offering year of the company.
  140.      * @return The initial public offering year of the company.
  141.      */
  142.     public int getIpoYear() {
  143.         return ipoYear;
  144.     }
  145.  
  146.     /**
  147.      * Gets the sector of the company.
  148.      * @return The sector of the company.
  149.      */
  150.     public String getSector() {
  151.         return sector;
  152.     }
  153.  
  154.     /**
  155.      * Gets the industry of the company.
  156.      * @return The industry of the company.
  157.      */
  158.     public String getIndustry() {
  159.         return industry;
  160.     }
  161.  
  162.     /**
  163.      * Gets the summary quote of the company.
  164.      * @return The summary quote of the company.
  165.      */
  166.     public String getSummaryQuote() {
  167.         return summaryQuote;
  168.     }
  169. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement