Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package org.stock.util;
- /**
- * Represents a company.
- * @author Ryan Greene
- *
- */
- public class Company {
- /**
- * The symbol or ticker.
- */
- private final String symbol;
- /**
- * The name.
- */
- private final String name;
- /**
- * The last sale.
- */
- private final double lastSale;
- /**
- * The market capacity.
- */
- private final double marketCap;
- /**
- * The applied data research time sharing option.
- */
- private final String adrTso;
- /**
- * The initial public offering year.
- */
- private final int ipoYear;
- /**
- * The sector.
- */
- private final String sector;
- /**
- * The industry.
- */
- private final String industry;
- /**
- * The summary quote.
- */
- private final String summaryQuote;
- /**
- * Creates a new company with the specified details.
- * @param symbol The symbol or ticker.
- * @param name The name.
- * @param lastSale The last sale.
- * @param marketCap The market cap.
- * @param The applied data research time sharing option.
- * @param ipoYear The initial public offering year.
- * @param sector The symbol.
- * @param industry The industry.
- * @param summaryQuote The summary quote.
- * @return The created company.
- */
- public static Company createCompany(String symbol, String name, double lastSale, double marketCap, String adrTso, int ipoYear,
- String sector, String industry, String summaryQuote) {
- return new Company(symbol, name, lastSale, marketCap, adrTso, ipoYear, sector, industry, summaryQuote);
- }
- /**
- * Constructs a new company.
- * @param symbol The symbol or ticker.
- * @param name The name.
- * @param lastSale The last sale.
- * @param marketCap The market cap.
- * @param The applied data research time sharing option.
- * @param ipoYear The initial public offering year.
- * @param sector The symbol.
- * @param industry The industry.
- * @param summaryQuote The summary quote.
- */
- private Company(String symbol, String name, double lastSale, double marketCap, String adrTso, int ipoYear,
- String sector, String industry, String summaryQuote) {
- this.symbol = symbol;
- this.name = name;
- this.lastSale = lastSale;
- this.marketCap = marketCap;
- this.adrTso = adrTso;
- this.ipoYear = ipoYear;
- this.sector = sector;
- this.industry = industry;
- this.summaryQuote = summaryQuote;
- }
- /**
- * Gets the symbol of the company.
- * @return The symbol of the company.
- */
- public String getSymbol() {
- return symbol;
- }
- /**
- * Gets the name of the company.
- * @return The name of the company.
- */
- public String getName() {
- return name;
- }
- /**
- * Gets the last sale of the company.
- * @return The last sale of the company.
- */
- public double getLastSale() {
- return lastSale;
- }
- /**
- * Gets the market capacity of the company.
- * @return The market capacity of the company.
- */
- public double getMarketCap() {
- return marketCap;
- }
- /**
- * Gets the applied data research time sharing option of the company.
- * @return The applied data research time sharing option of the company.
- */
- public String getAdrTso() {
- return adrTso;
- }
- /**
- * Gets the initial public offering year of the company.
- * @return The initial public offering year of the company.
- */
- public int getIpoYear() {
- return ipoYear;
- }
- /**
- * Gets the sector of the company.
- * @return The sector of the company.
- */
- public String getSector() {
- return sector;
- }
- /**
- * Gets the industry of the company.
- * @return The industry of the company.
- */
- public String getIndustry() {
- return industry;
- }
- /**
- * Gets the summary quote of the company.
- * @return The summary quote of the company.
- */
- public String getSummaryQuote() {
- return summaryQuote;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement