Class Quote
java.lang.Object
org.episteme.social.economics.money.Quote
- All Implemented Interfaces:
Serializable
Represents a market quote for a financial instrument.
A quote contains pricing information for a security including current price, volume, and price range data.
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the price change as a percentage.getValue()longinthashCode()voidvoidsetCompany(String company) voidsetHighPrice(Money highPrice) voidsetLowPrice(Money lowPrice) voidsetOpenPrice(Money openPrice) voidsetPreviousClose(Money previousClose) voidsetQuoteTime(TimeCoordinate quoteTime) voidvoidsetVolume(long volume) toString()voidupdate(long volume, Money value, TimeCoordinate quoteTime) Updates the quote with new trading data.
-
Constructor Details
-
Quote
Creates a new Quote with basic information.- Parameters:
symbol- the ticker symbolcompany- the company namemarket- the exchange market- Throws:
NullPointerException- if any argument is nullIllegalArgumentException- if any string is empty
-
Quote
public Quote(String symbol, String company, long volume, Money value, String market, Money openPrice, TimeCoordinate quoteTime) Creates a new Quote with full information.- Parameters:
symbol- the ticker symbolcompany- the company namevolume- the trading volumevalue- the current pricemarket- the exchange marketopenPrice- the opening pricequoteTime- the time of the quote
-
-
Method Details
-
getSymbol
-
getCompany
-
getVolume
public long getVolume() -
getValue
-
getMarket
-
getOpenPrice
-
getHighPrice
-
getLowPrice
-
getPreviousClose
-
getChange
-
getQuoteTime
-
getChangePercent
Returns the price change as a percentage.- Returns:
- the change percentage
-
setCompany
-
setVolume
public void setVolume(long volume) -
setValue
-
setOpenPrice
-
setHighPrice
-
setLowPrice
-
setPreviousClose
-
setChange
-
setQuoteTime
-
update
Updates the quote with new trading data.- Parameters:
volume- the new volumevalue- the new pricequoteTime- the time of update
-
equals
-
hashCode
-
toString
-