1 42 43 package org.jfree.data.xy; 44 45 import org.jfree.data.ComparableObjectItem; 46 47 52 public class XIntervalDataItem extends ComparableObjectItem { 53 54 62 public XIntervalDataItem(double x, double xLow, double xHigh, double y) { 63 super(new Double (x), new YWithXInterval(y, xLow, xHigh)); 64 } 65 66 71 public Number getX() { 72 return (Number ) getComparable(); 73 } 74 75 80 public double getYValue() { 81 YWithXInterval interval = (YWithXInterval) getObject(); 82 if (interval != null) { 83 return interval.getY(); 84 } 85 else { 86 return Double.NaN; 87 } 88 } 89 90 95 public double getXLowValue() { 96 YWithXInterval interval = (YWithXInterval) getObject(); 97 if (interval != null) { 98 return interval.getXLow(); 99 } 100 else { 101 return Double.NaN; 102 } 103 } 104 105 110 public double getXHighValue() { 111 YWithXInterval interval = (YWithXInterval) getObject(); 112 if (interval != null) { 113 return interval.getXHigh(); 114 } 115 else { 116 return Double.NaN; 117 } 118 } 119 120 } 121 | Popular Tags |