public class OHLCDataItem
extends java.lang.Object
implements java.lang.Comparable, java.io.Serializable
DefaultOHLCDataset. This data item is commonly used
to summarise the trading activity of a financial commodity for
a fixed period (most often one day).| Modifier and Type | Field and Description |
|---|---|
private java.lang.Number |
close
The close value.
|
private java.util.Date |
date
The date.
|
private java.lang.Number |
high
The high value.
|
private java.lang.Number |
low
The low value.
|
private java.lang.Number |
open
The open value.
|
private static long |
serialVersionUID
For serialization.
|
private java.lang.Number |
volume
The trading volume (number of shares, contracts or whatever).
|
| Constructor and Description |
|---|
OHLCDataItem(java.util.Date date,
double open,
double high,
double low,
double close,
double volume)
Creates a new item.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(java.lang.Object object)
Compares this object with the specified object for order.
|
boolean |
equals(java.lang.Object obj)
Checks this instance for equality with an arbitrary object.
|
java.lang.Number |
getClose()
Returns the close value.
|
java.util.Date |
getDate()
Returns the date that the data item relates to.
|
java.lang.Number |
getHigh()
Returns the high value.
|
java.lang.Number |
getLow()
Returns the low value.
|
java.lang.Number |
getOpen()
Returns the open value.
|
java.lang.Number |
getVolume()
Returns the volume.
|
private static final long serialVersionUID
private java.util.Date date
private java.lang.Number open
private java.lang.Number high
private java.lang.Number low
private java.lang.Number close
private java.lang.Number volume
public OHLCDataItem(java.util.Date date,
double open,
double high,
double low,
double close,
double volume)
date - the date (null not permitted).open - the open value.high - the high value.low - the low value.close - the close value.volume - the volume.public java.util.Date getDate()
null).public java.lang.Number getOpen()
null).public java.lang.Number getHigh()
null).public java.lang.Number getLow()
null).public java.lang.Number getClose()
null).public java.lang.Number getVolume()
null).public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the object (null permitted).public int compareTo(java.lang.Object object)
compareTo in interface java.lang.Comparableobject - the object to compare to.