1 42 43 package org.jfree.data.xy; 44 45 import org.jfree.data.ComparableObjectItem; 46 import org.jfree.data.ComparableObjectSeries; 47 48 55 public class XYIntervalSeries extends ComparableObjectSeries { 56 57 64 public XYIntervalSeries(Comparable key) { 65 this(key, true, true); 66 } 67 68 78 public XYIntervalSeries(Comparable key, boolean autoSort, 79 boolean allowDuplicateXValues) { 80 super(key, autoSort, allowDuplicateXValues); 81 } 82 83 93 public void add(double x, double xLow, double xHigh, double y, double yLow, 94 double yHigh) { 95 super.add(new XYIntervalDataItem(x, xLow, xHigh, y, yLow, yHigh), true); 96 } 97 98 105 public Number getX(int index) { 106 XYIntervalDataItem item = (XYIntervalDataItem) getDataItem(index); 107 return item.getX(); 108 } 109 110 117 public double getYValue(int index) { 118 XYIntervalDataItem item = (XYIntervalDataItem) getDataItem(index); 119 return item.getYValue(); 120 } 121 122 129 public ComparableObjectItem getDataItem(int index) { 130 return super.getDataItem(index); 131 } 132 133 } 134 | Popular Tags |