net.spy.info
Class StockQuote

java.lang.Object
  extended bynet.spy.info.StockQuote

public class StockQuote
extends Object

An individual stock quote.


Constructor Summary
StockQuote(String csv)
          Create a StockQuote object from a yahoo CSV output.
 
Method Summary
 double getChange()
          gets the amount of change since market opening.
 String getDate()
          gets the date of the trade that set this price.
 double getHigh()
          gets today's high value of the stock.
 double getLow()
          gets today's low value of the stock.
 double getOpen()
          gets the opening price of the stock.
 double getPrice()
          gets the current stock price.
 String getSymbol()
          gets the ticket symbol this object describes.
 String getTime()
          gets the time of the trade that set this price.
 int getVolume()
          gets the amount of volume of trade.
 String toString()
          produces a readable version of the StockQuote
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StockQuote

public StockQuote(String csv)
           throws Exception
Create a StockQuote object from a yahoo CSV output.

Parameters:
csv - line of csv from yahoo
Throws:
Exception - for an invalid cvs line
Method Detail

toString

public String toString()
produces a readable version of the StockQuote


getSymbol

public String getSymbol()
gets the ticket symbol this object describes.


getPrice

public double getPrice()
gets the current stock price.


getDate

public String getDate()
gets the date of the trade that set this price.


getTime

public String getTime()
gets the time of the trade that set this price.


getChange

public double getChange()
gets the amount of change since market opening.


getOpen

public double getOpen()
gets the opening price of the stock.


getHigh

public double getHigh()
gets today's high value of the stock.


getLow

public double getLow()
gets today's low value of the stock.


getVolume

public int getVolume()
gets the amount of volume of trade.