interface. See also
the
class, which provides another implementation
that is very similar.
| Method from org.jfree.data.xy.DefaultHighLowDataset Detail: |
public static Number[] createNumberArray(double[] data) {
Number[] result = new Number[data.length];
for (int i = 0; i < data.length; i++) {
result[i] = new Double(data[i]);
}
return result;
}
Constructs an array of Number objects from an array of doubles. |
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof DefaultHighLowDataset)) {
return false;
}
DefaultHighLowDataset that = (DefaultHighLowDataset) obj;
if (!this.seriesKey.equals(that.seriesKey)) {
return false;
}
if (!Arrays.equals(this.date, that.date)) {
return false;
}
if (!Arrays.equals(this.open, that.open)) {
return false;
}
if (!Arrays.equals(this.high, that.high)) {
return false;
}
if (!Arrays.equals(this.low, that.low)) {
return false;
}
if (!Arrays.equals(this.close, that.close)) {
return false;
}
if (!Arrays.equals(this.volume, that.volume)) {
return false;
}
return true;
}
Tests this dataset for equality with an arbitrary instance. |
public Number getClose(int series,
int item) {
return this.close[item];
}
Returns the close-value for one item in a series. |
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.high[item];
}
Returns the high-value for one item in a series. |
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.date.length;
}
Returns the number of items in the specified series. |
public Number getLow(int series,
int item) {
return this.low[item];
}
Returns the low-value for one item in a series. |
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.open[item];
}
Returns the open-value for one item in a series. |
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;
}
|
public Comparable getSeriesKey(int series) {
return this.seriesKey;
}
Returns the key for the series stored in this dataset. |
public Number getVolume(int series,
int item) {
return this.volume[item];
}
Returns the volume-value for one item in a series. |
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.date[item].getTime());
}
Returns the x-value for one item in a series. The value returned is a
Long instance generated from the underlying
Date object. To avoid generating a new object instance,
you might prefer to call #getXValue(int, int) . |
public Date getXDate(int series,
int item) {
return this.date[item];
}
|
public Number getY(int series,
int item) {
return getClose(series, item);
}
|