powerquotes.common
Class StockInfo
java.lang.Object
|
+--powerquotes.common.StockInfo
- All Implemented Interfaces:
- java.io.Serializable
- public class StockInfo
- extends java.lang.Object
- implements java.io.Serializable
- See Also:
- Serialized Form
|
Constructor Summary |
StockInfo(int id,
java.lang.String symbol,
java.lang.String name,
double price,
long timestamp)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
StockInfo
public StockInfo(int id,
java.lang.String symbol,
java.lang.String name,
double price,
long timestamp)
- Parameters:
id - unique ID for this stocksymbol - the stock's ticker symbolname - the company's full nameprice - the current price of the stocktimestamp - the last time the stock price has been updated,
in milliseconds since the Epoch. (i.e. Unix time)
getId
public int getId()
getSymbol
public java.lang.String getSymbol()
getName
public java.lang.String getName()
getPrice
public double getPrice()
getTimestamp
public long getTimestamp()
setPrice
public void setPrice(double newPrice)
setTimestamp
public void setTimestamp(long newTimestamp)
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object