/** * Returns the x-value for an item within a series. The x-values may or * may not be returned in ascending order, that is up to the class * implementing the interface. * * @param series the series (zero-based index). * @param item the item (zero-based index). * * @return The x-value. */ @Override public Number getX(int series, int item) { return new Double(getXValue(series, item)); }
/** * Returns the x-value for an item within a series. The x-values may or * may not be returned in ascending order, that is up to the class * implementing the interface. * * @param series the series (zero-based index). * @param item the item (zero-based index). * * @return The x-value. */ public Number getX(int series, int item) { return new Double(getXValue(series, item)); }
/** * Returns the x-value (as a double primitive) for an item within a series. * * @param series the series index (zero-based). * @param item the item index (zero-based). * * @return The value. */ @Override public double getXValue(int series, int item) { TimePeriod period = (TimePeriod) this.values.getRowKey(item); return getXValue(period); }
/** * Returns the x-value (as a double primitive) for an item within a series. * * @param series the series index (zero-based). * @param item the item index (zero-based). * * @return The value. */ public double getXValue(int series, int item) { TimePeriod period = (TimePeriod) this.values.getRowKey(item); return getXValue(period); }
/** * Returns the range of the values in this dataset's domain. * * @param includeInterval a flag that controls whether or not the * x-intervals are taken into account. * * @return The range. */ @Override public Range getDomainBounds(boolean includeInterval) { List keys = this.values.getRowKeys(); if (keys.isEmpty()) { return null; } TimePeriod first = (TimePeriod) keys.get(0); TimePeriod last = (TimePeriod) keys.get(keys.size() - 1); if (!includeInterval || this.domainIsPointsInTime) { return new Range(getXValue(first), getXValue(last)); } else { return new Range(first.getStart().getTime(), last.getEnd().getTime()); } }
/** * Returns the range of the values in this dataset's domain. * * @param includeInterval a flag that controls whether or not the * x-intervals are taken into account. * * @return The range. */ public Range getDomainBounds(boolean includeInterval) { List keys = this.values.getRowKeys(); if (keys.isEmpty()) { return null; } TimePeriod first = (TimePeriod) keys.get(0); TimePeriod last = (TimePeriod) keys.get(keys.size() - 1); if (!includeInterval || this.domainIsPointsInTime) { return new Range(getXValue(first), getXValue(last)); } else { return new Range(first.getStart().getTime(), last.getEnd().getTime()); } }