|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.otfeed.event.OTOHLC
public final class OTOHLC
This class provides historical OHLC values (open, high, low, and close prices) for the requested time period. Also it provides the volume value (the accumulated number of shares) in the requested time period. In cases when there were not any transactions within certain time period, all the price values, as well as the volume value, are set to zero.
Constructor Summary | |
---|---|
OTOHLC()
Default constructor. |
|
OTOHLC(java.util.Date timestamp,
double openPrice,
double highPrice,
double lowPrice,
double closePrice,
long volume)
Constructor. |
Method Summary | |
---|---|
int |
compareTo(OTOHLC other)
|
boolean |
equals(java.lang.Object o)
|
double |
getClosePrice()
|
double |
getHighPrice()
|
double |
getLowPrice()
|
double |
getOpenPrice()
|
java.util.Date |
getTimestamp()
|
long |
getVolume()
|
int |
hashCode()
|
void |
setClosePrice(double closePrice)
Sets close price. |
void |
setHighPrice(double highPrice)
Sets high price. |
void |
setLowPrice(double lowPrice)
Sets low price. |
void |
setOpenPrice(double openPrice)
Sets open price. |
void |
setTimestamp(java.util.Date timestamp)
Sets time of the event. |
void |
setVolume(long volume)
Sets accumulated volume for the requested time period. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public OTOHLC()
public OTOHLC(java.util.Date timestamp, double openPrice, double highPrice, double lowPrice, double closePrice, long volume)
timestamp
- Time when the event occurred.openPrice
- Open price.highPrice
- High price.lowPrice
- Low price.closePrice
- Close price.volume
- Accumulated volume for the requested time period.Method Detail |
---|
public java.util.Date getTimestamp()
public void setTimestamp(java.util.Date timestamp)
timestamp
- Time when the event occurred.public double getOpenPrice()
public void setOpenPrice(double openPrice)
openPrice
- Open price.public double getHighPrice()
public void setHighPrice(double highPrice)
highPrice
- High price.public double getLowPrice()
public void setLowPrice(double lowPrice)
lowPrice
- Low price.public double getClosePrice()
public void setClosePrice(double closePrice)
closePrice
- Close price.public long getVolume()
public void setVolume(long volume)
volume
- Accumulated volume for the requested time period.public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int compareTo(OTOHLC other)
compareTo
in interface java.lang.Comparable<OTOHLC>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |