本文整理匯總了Java中org.jfree.data.xy.IntervalXYDataset.getStartYValue方法的典型用法代碼示例。如果您正苦於以下問題:Java IntervalXYDataset.getStartYValue方法的具體用法?Java IntervalXYDataset.getStartYValue怎麽用?Java IntervalXYDataset.getStartYValue使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.jfree.data.xy.IntervalXYDataset
的用法示例。
在下文中一共展示了IntervalXYDataset.getStartYValue方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: iterateXYRangeExtent
import org.jfree.data.xy.IntervalXYDataset; //導入方法依賴的package包/類
/**
* Iterates over the data item of the xy dataset to find
* the range extent.
*
* @param dataset the dataset (<code>null</code> not permitted).
*
* @return The range (possibly <code>null</code>).
*/
public static Range iterateXYRangeExtent(XYDataset dataset) {
double minimum = Double.POSITIVE_INFINITY;
double maximum = Double.NEGATIVE_INFINITY;
int seriesCount = dataset.getSeriesCount();
for (int series = 0; series < seriesCount; series++) {
int itemCount = dataset.getItemCount(series);
for (int item = 0; item < itemCount; item++) {
double lvalue;
double uvalue;
if (dataset instanceof IntervalXYDataset) {
IntervalXYDataset intervalXYData = (IntervalXYDataset) dataset;
lvalue = intervalXYData.getStartYValue(series, item);
uvalue = intervalXYData.getEndYValue(series, item);
}
else if (dataset instanceof OHLCDataset) {
OHLCDataset highLowData = (OHLCDataset) dataset;
lvalue = highLowData.getLowValue(series, item);
uvalue = highLowData.getHighValue(series, item);
}
else {
lvalue = dataset.getYValue(series, item);
uvalue = lvalue;
}
if (!Double.isNaN(lvalue)) {
minimum = Math.min(minimum, lvalue);
}
if (!Double.isNaN(uvalue)) {
maximum = Math.max(maximum, uvalue);
}
}
}
if (minimum == Double.POSITIVE_INFINITY) {
return null;
}
else {
return new Range(minimum, maximum);
}
}
示例2: iterateXYRangeBounds
import org.jfree.data.xy.IntervalXYDataset; //導入方法依賴的package包/類
/**
* Iterates over the data item of the xy dataset to find
* the range bounds.
*
* @param dataset the dataset (<code>null</code> not permitted).
*
* @return The range (possibly <code>null</code>).
*/
public static Range iterateXYRangeBounds(XYDataset dataset) {
double minimum = Double.POSITIVE_INFINITY;
double maximum = Double.NEGATIVE_INFINITY;
int seriesCount = dataset.getSeriesCount();
for (int series = 0; series < seriesCount; series++) {
int itemCount = dataset.getItemCount(series);
for (int item = 0; item < itemCount; item++) {
double lvalue;
double uvalue;
if (dataset instanceof IntervalXYDataset) {
IntervalXYDataset intervalXYData
= (IntervalXYDataset) dataset;
lvalue = intervalXYData.getStartYValue(series, item);
uvalue = intervalXYData.getEndYValue(series, item);
}
else if (dataset instanceof OHLCDataset) {
OHLCDataset highLowData = (OHLCDataset) dataset;
lvalue = highLowData.getLowValue(series, item);
uvalue = highLowData.getHighValue(series, item);
}
else {
lvalue = dataset.getYValue(series, item);
uvalue = lvalue;
}
if (!Double.isNaN(lvalue)) {
minimum = Math.min(minimum, lvalue);
}
if (!Double.isNaN(uvalue)) {
maximum = Math.max(maximum, uvalue);
}
}
}
if (minimum == Double.POSITIVE_INFINITY) {
return null;
}
else {
return new Range(minimum, maximum);
}
}
示例3: findMinimumRangeValue
import org.jfree.data.xy.IntervalXYDataset; //導入方法依賴的package包/類
/**
* Returns the minimum range value for the specified dataset. This is easy if the
* dataset implements the {@link RangeInfo} interface (a good idea if there is an
* efficient way to determine the minimum value). Otherwise, it involves iterating
* over the entire data-set. Returns <code>null</code> if all the data values in the
* dataset are <code>null</code>.
*
* @param dataset the dataset (<code>null</code> not permitted).
*
* @return The minimum value (possibly <code>null</code>).
*/
public static Number findMinimumRangeValue(XYDataset dataset) {
if (dataset == null) {
throw new IllegalArgumentException("Null 'dataset' argument.");
}
// work out the minimum value...
if (dataset instanceof RangeInfo) {
RangeInfo info = (RangeInfo) dataset;
return info.getMinimumRangeValue();
}
// hasn't implemented RangeInfo, so we'll have to iterate...
else {
double minimum = Double.POSITIVE_INFINITY;
int seriesCount = dataset.getSeriesCount();
for (int series = 0; series < seriesCount; series++) {
int itemCount = dataset.getItemCount(series);
for (int item = 0; item < itemCount; item++) {
double value;
if (dataset instanceof IntervalXYDataset) {
IntervalXYDataset intervalXYData = (IntervalXYDataset) dataset;
value = intervalXYData.getStartYValue(series, item);
}
else if (dataset instanceof OHLCDataset) {
OHLCDataset highLowData = (OHLCDataset) dataset;
value = highLowData.getLowValue(series, item);
}
else {
value = dataset.getYValue(series, item);
}
if (!Double.isNaN(value)) {
minimum = Math.min(minimum, value);
}
}
}
if (minimum == Double.POSITIVE_INFINITY) {
return null;
}
else {
return new Double(minimum);
}
}
}
示例4: findMinimumRangeValue
import org.jfree.data.xy.IntervalXYDataset; //導入方法依賴的package包/類
/**
* Returns the minimum range value for the specified dataset. This is
* easy if the dataset implements the {@link RangeInfo} interface (a good
* idea if there is an efficient way to determine the minimum value).
* Otherwise, it involves iterating over the entire data-set. Returns
* <code>null</code> if all the data values in the dataset are
* <code>null</code>.
*
* @param dataset the dataset (<code>null</code> not permitted).
*
* @return The minimum value (possibly <code>null</code>).
*/
public static Number findMinimumRangeValue(XYDataset dataset) {
if (dataset == null) {
throw new IllegalArgumentException("Null 'dataset' argument.");
}
// work out the minimum value...
if (dataset instanceof RangeInfo) {
RangeInfo info = (RangeInfo) dataset;
return new Double(info.getRangeLowerBound(true));
}
// hasn't implemented RangeInfo, so we'll have to iterate...
else {
double minimum = Double.POSITIVE_INFINITY;
int seriesCount = dataset.getSeriesCount();
for (int series = 0; series < seriesCount; series++) {
int itemCount = dataset.getItemCount(series);
for (int item = 0; item < itemCount; item++) {
double value;
if (dataset instanceof IntervalXYDataset) {
IntervalXYDataset intervalXYData
= (IntervalXYDataset) dataset;
value = intervalXYData.getStartYValue(series, item);
}
else if (dataset instanceof OHLCDataset) {
OHLCDataset highLowData = (OHLCDataset) dataset;
value = highLowData.getLowValue(series, item);
}
else {
value = dataset.getYValue(series, item);
}
if (!Double.isNaN(value)) {
minimum = Math.min(minimum, value);
}
}
}
if (minimum == Double.POSITIVE_INFINITY) {
return null;
}
else {
return new Double(minimum);
}
}
}
示例5: findMinimumRangeValue
import org.jfree.data.xy.IntervalXYDataset; //導入方法依賴的package包/類
/**
* Returns the minimum range value for the specified dataset. This is
* easy if the dataset implements the {@link RangeInfo} interface (a good
* idea if there is an efficient way to determine the minimum value).
* Otherwise, it involves iterating over the entire data-set. Returns
* <code>null</code> if all the data values in the dataset are
* <code>null</code>.
*
* @param dataset the dataset (<code>null</code> not permitted).
*
* @return The minimum value (possibly <code>null</code>).
*/
public static Number findMinimumRangeValue(XYDataset dataset) {
ParamChecks.nullNotPermitted(dataset, "dataset");
// work out the minimum value...
if (dataset instanceof RangeInfo) {
RangeInfo info = (RangeInfo) dataset;
return new Double(info.getRangeLowerBound(true));
}
// hasn't implemented RangeInfo, so we'll have to iterate...
else {
double minimum = Double.POSITIVE_INFINITY;
int seriesCount = dataset.getSeriesCount();
for (int series = 0; series < seriesCount; series++) {
int itemCount = dataset.getItemCount(series);
for (int item = 0; item < itemCount; item++) {
double value;
if (dataset instanceof IntervalXYDataset) {
IntervalXYDataset intervalXYData
= (IntervalXYDataset) dataset;
value = intervalXYData.getStartYValue(series, item);
}
else if (dataset instanceof OHLCDataset) {
OHLCDataset highLowData = (OHLCDataset) dataset;
value = highLowData.getLowValue(series, item);
}
else {
value = dataset.getYValue(series, item);
}
if (!Double.isNaN(value)) {
minimum = Math.min(minimum, value);
}
}
}
if (minimum == Double.POSITIVE_INFINITY) {
return null;
}
else {
return new Double(minimum);
}
}
}
示例6: findMinimumRangeValue
import org.jfree.data.xy.IntervalXYDataset; //導入方法依賴的package包/類
/**
* Returns the minimum range value for the specified dataset. This is
* easy if the dataset implements the {@link RangeInfo} interface (a good
* idea if there is an efficient way to determine the minimum value).
* Otherwise, it involves iterating over the entire data-set. Returns
* {@code null} if all the data values in the dataset are
* {@code null}.
*
* @param dataset the dataset ({@code null} not permitted).
*
* @return The minimum value (possibly {@code null}).
*/
public static Number findMinimumRangeValue(XYDataset dataset) {
Args.nullNotPermitted(dataset, "dataset");
// work out the minimum value...
if (dataset instanceof RangeInfo) {
RangeInfo info = (RangeInfo) dataset;
return new Double(info.getRangeLowerBound(true));
}
// hasn't implemented RangeInfo, so we'll have to iterate...
else {
double minimum = Double.POSITIVE_INFINITY;
int seriesCount = dataset.getSeriesCount();
for (int series = 0; series < seriesCount; series++) {
int itemCount = dataset.getItemCount(series);
for (int item = 0; item < itemCount; item++) {
double value;
if (dataset instanceof IntervalXYDataset) {
IntervalXYDataset intervalXYData
= (IntervalXYDataset) dataset;
value = intervalXYData.getStartYValue(series, item);
}
else if (dataset instanceof OHLCDataset) {
OHLCDataset highLowData = (OHLCDataset) dataset;
value = highLowData.getLowValue(series, item);
}
else {
value = dataset.getYValue(series, item);
}
if (!Double.isNaN(value)) {
minimum = Math.min(minimum, value);
}
}
}
if (minimum == Double.POSITIVE_INFINITY) {
return null;
}
else {
return new Double(minimum);
}
}
}
示例7: findMinimumRangeValue
import org.jfree.data.xy.IntervalXYDataset; //導入方法依賴的package包/類
/**
* Returns the minimum range value for the specified dataset. This is
* easy if the dataset implements the {@link RangeInfo} interface (a good
* idea if there is an efficient way to determine the minimum value).
* Otherwise, it involves iterating over the entire data-set. Returns
* <code>null</code> if all the data values in the dataset are
* <code>null</code>.
*
* @param dataset the dataset (<code>null</code> not permitted).
*
* @return The minimum value (possibly <code>null</code>).
*/
public static Number findMinimumRangeValue(XYDataset dataset) {
if (dataset == null) {
throw new IllegalArgumentException("Null 'dataset' argument.");
}
// work out the minimum value...
if (dataset instanceof RangeInfo) {
RangeInfo info = (RangeInfo) dataset;
return new Double(info.getRangeLowerBound(true));
}
// hasn't implemented RangeInfo, so we'll have to iterate...
else {
double minimum = Double.POSITIVE_INFINITY;
int seriesCount = dataset.getSeriesCount();
for (int series = 0; series < seriesCount; series++) {
int itemCount = dataset.getItemCount(series);
for (int item = 0; item < itemCount; item++) {
double value;
if (dataset instanceof IntervalXYDataset) {
IntervalXYDataset intervalXYData
= (IntervalXYDataset) dataset;
value = intervalXYData.getStartYValue(series, item);
}
else if (dataset instanceof OHLCDataset) {
OHLCDataset highLowData = (OHLCDataset) dataset;
value = highLowData.getLowValue(series, item);
}
else {
value = dataset.getYValue(series, item);
}
if (!Double.isNaN(value)) {
minimum = Math.min(minimum, value);
}
}
}
if (minimum == Double.POSITIVE_INFINITY) {
return null;
}
else {
return new Double(minimum);
}
}
}
示例8: findMinimumRangeValue
import org.jfree.data.xy.IntervalXYDataset; //導入方法依賴的package包/類
/**
* Returns the minimum range value for the specified dataset. This is
* easy if the dataset implements the {@link RangeInfo} interface (a good
* idea if there is an efficient way to determine the minimum value).
* Otherwise, it involves iterating over the entire data-set. Returns
* <code>null</code> if all the data values in the dataset are
* <code>null</code>.
*
* @param dataset the dataset (<code>null</code> not permitted).
*
* @return The minimum value (possibly <code>null</code>).
*/
public static Number findMinimumRangeValue(XYDataset dataset) {
if (dataset == null) {
throw new IllegalArgumentException("Null 'dataset' argument.");
}
// work out the minimum value...
if (dataset instanceof RangeInfo) {
RangeInfo info = (RangeInfo) dataset;
return new Double(info.getRangeLowerBound(true));
}
// hasn't implemented RangeInfo, so we'll have to iterate...
else {
double minimum = Double.POSITIVE_INFINITY;
int seriesCount = dataset.getSeriesCount();
for (int series = 0; series < seriesCount; series++) {
int itemCount = dataset.getItemCount(series);
for (int item = 0; item < itemCount; item++) {
double value;
if (dataset instanceof IntervalXYDataset) {
IntervalXYDataset intervalXYData
= (IntervalXYDataset) dataset;
value = intervalXYData.getStartYValue(series, item);
}
else if (dataset instanceof OHLCDataset) {
OHLCDataset highLowData = (OHLCDataset) dataset;
value = highLowData.getLowValue(series, item);
}
else {
value = dataset.getYValue(series, item);
}
if (!Double.isNaN(value)) {
minimum = Math.min(minimum, value);
}
}
}
if (minimum == Double.POSITIVE_INFINITY) {
return null;
}
else {
return new Double(minimum);
}
}
}