interface. This
implementation supports only one series.
| Method from org.jfree.data.xy.DefaultOHLCDataset Detail: |
public Object clone() throws CloneNotSupportedException {
DefaultOHLCDataset clone = (DefaultOHLCDataset) super.clone();
clone.data = new OHLCDataItem[this.data.length];
System.arraycopy(this.data, 0, clone.data, 0, this.data.length);
return clone;
}
Returns an independent copy of this dataset. |
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof DefaultOHLCDataset)) {
return false;
}
DefaultOHLCDataset that = (DefaultOHLCDataset) obj;
if (!this.key.equals(that.key)) {
return false;
}
if (!Arrays.equals(this.data, that.data)) {
return false;
}
return true;
}
Tests this instance for equality with an arbitrary object. |
public Number getClose(int series,
int item) {
return this.data[item].getClose();
}
|
public double getCloseValue(int series,
int item) {
double result = Double.NaN;
Number close = getClose(series, item);
if (close != null) {
result = close.doubleValue();
}
return result;
}
Returns the close-value (as a double primitive) for an item within a
series. |
public Number getHigh(int series,
int item) {
return this.data[item].getHigh();
}
|
public double getHighValue(int series,
int item) {
double result = Double.NaN;
Number high = getHigh(series, item);
if (high != null) {
result = high.doubleValue();
}
return result;
}
Returns the high-value (as a double primitive) for an item within a
series. |
public int getItemCount(int series) {
return this.data.length;
}
Returns the item count for the specified series. |
public Number getLow(int series,
int item) {
return this.data[item].getLow();
}
|
public double getLowValue(int series,
int item) {
double result = Double.NaN;
Number low = getLow(series, item);
if (low != null) {
result = low.doubleValue();
}
return result;
}
Returns the low-value (as a double primitive) for an item within a
series. |
public Number getOpen(int series,
int item) {
return this.data[item].getOpen();
}
|
public double getOpenValue(int series,
int item) {
double result = Double.NaN;
Number open = getOpen(series, item);
if (open != null) {
result = open.doubleValue();
}
return result;
}
Returns the open-value (as a double primitive) for an item within a
series. |
public int getSeriesCount() {
return 1;
}
Returns the series count. |
public Comparable getSeriesKey(int series) {
return this.key;
}
|
public Number getVolume(int series,
int item) {
return this.data[item].getVolume();
}
Returns the trading volume. |
public double getVolumeValue(int series,
int item) {
double result = Double.NaN;
Number volume = getVolume(series, item);
if (volume != null) {
result = volume.doubleValue();
}
return result;
}
Returns the volume-value (as a double primitive) for an item within a
series. |
public Number getX(int series,
int item) {
return new Long(this.data[item].getDate().getTime());
}
Returns the x-value for a data item. |
public Date getXDate(int series,
int item) {
return this.data[item].getDate();
}
Returns the x-value for a data item as a date. |
public Number getY(int series,
int item) {
return getClose(series, item);
}
|
public void sortDataByDate() {
Arrays.sort(this.data);
}
Sorts the data into ascending order by date. |